RE: Strange Text Field

2004-08-19 Thread Terry Riley
Stuart

Could this be something as simple as the fact that you have a field with a 
space in its name ('Contact Email'), which is sometimes called as 'Contact 
Email' and sometimes as 'Contact_Email'?

I'm not even sure if a blank space is actually allowed in field names

Cheers
Terry Riley


- Original Message -

 Okay, still not working in this one table so here is
 all my info:  I've also attached the table dump.
 
 Thank you ,
 Stuart
 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Strange Text Field

2004-08-18 Thread Rhino

- Original Message - 
From: Stuart Felenstein [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 18, 2004 3:49 PM
Subject: Strange Text Field


 Hoping I can figure this out.  Using MySQl
 4.0.20-Standard.

 I have a table (tried this both myISAM and Innodb)
 with 12 fields, 3 are ints, 7 are varchars and 1 is
 set to text.
 Form is using a textarea for input into the text
 field.  Basically a copy and paste of rich text.  (I'm
 not concerned with formatting right now)

 Anyway it won't take and returns a vague SQL syntax
 error. If I try to input it directly into the database
 I get an error about the grid being 12 columns and the
 clipboard being 1 column.  Yet I had all the other
 fields filled in.  And all but the ID is set to allow
 nulls.

  Frustrated to figure out why this is occuring I
 created a table with 2 fields, one for the recordID,
 the other for the text dump.  Works like a charm.

 So has anyone seen this before ?  It seems odd , I've
 searched the manual and bug base and came up with
 nothing.

Unless someone can quickly identify it is as a well-known issue, I suggest
that you supply some code fragments that show what you're doing, as well as
any error messages you are getting. Right now, we don't even know what
language you're using, let alone what might be wrong in your code.

I have successfully copied regular text from a form text field to a MySQL
table but I've never tried rich text; I'm not even sure how to get rich text
*into* a text field on a form. I might use a clipboard that is sensitive to
rich text to get the rich text onto the form field but I wouldn't have
thought of using it to transfer data between the form and MySQL. Therefore,
I can't even visualize roughly how you're doing what you're doing let alone
what sort of coding error you might have made. I suspect I speak for others
on this list, too.

Does your program store the data correctly if you just put regular text in
the form field, rather than rich text? That might help determine if this is
some kind of encoding/codepage problem.

Rhino


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Strange Text Field

2004-08-18 Thread Victor Pendleton
What is the application you are using to insert and retrieve the blob data?
Is the data actually being inserted? 

-Original Message-
From: Stuart Felenstein
To: [EMAIL PROTECTED]
Sent: 8/18/04 2:49 PM
Subject: Strange Text Field

Hoping I can figure this out.  Using MySQl
4.0.20-Standard. 

I have a table (tried this both myISAM and Innodb)
with 12 fields, 3 are ints, 7 are varchars and 1 is
set to text.  
Form is using a textarea for input into the text
field.  Basically a copy and paste of rich text.  (I'm
not concerned with formatting right now)

Anyway it won't take and returns a vague SQL syntax
error. If I try to input it directly into the database
I get an error about the grid being 12 columns and the
clipboard being 1 column.  Yet I had all the other
fields filled in.  And all but the ID is set to allow
nulls.

 Frustrated to figure out why this is occuring I
created a table with 2 fields, one for the recordID,
the other for the text dump.  Works like a charm.

So has anyone seen this before ?  It seems odd , I've
searched the manual and bug base and came up with
nothing. 

Thank you ,
Stuart

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Strange Text Field

2004-08-18 Thread Stuart Felenstein
I understand about supplying the code and will.  I'm
actually rebuilding it again.  
Language is Php and Adodb and not to get to estoteric,
I'm using a RAD called Impakt which fits into
Dreamweaver. 
Anyway, while I can supply the code, the weirdness is
that it won't work in one table but will in another. 
THe code is the same for both.
After I rebuid the form I'll go ahead and post it.

Thank you,
Stuart
--- Rhino [EMAIL PROTECTED] wrote:

 
 - Original Message - 
 From: Stuart Felenstein [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 18, 2004 3:49 PM
 Subject: Strange Text Field
 
 
  Hoping I can figure this out.  Using MySQl
  4.0.20-Standard.
 
  I have a table (tried this both myISAM and Innodb)
  with 12 fields, 3 are ints, 7 are varchars and 1
 is
  set to text.
  Form is using a textarea for input into the text
  field.  Basically a copy and paste of rich text. 
 (I'm
  not concerned with formatting right now)
 
  Anyway it won't take and returns a vague SQL
 syntax
  error. If I try to input it directly into the
 database
  I get an error about the grid being 12 columns and
 the
  clipboard being 1 column.  Yet I had all the other
  fields filled in.  And all but the ID is set to
 allow
  nulls.
 
   Frustrated to figure out why this is occuring I
  created a table with 2 fields, one for the
 recordID,
  the other for the text dump.  Works like a charm.
 
  So has anyone seen this before ?  It seems odd ,
 I've
  searched the manual and bug base and came up with
  nothing.
 
 Unless someone can quickly identify it is as a
 well-known issue, I suggest
 that you supply some code fragments that show what
 you're doing, as well as
 any error messages you are getting. Right now, we
 don't even know what
 language you're using, let alone what might be wrong
 in your code.
 
 I have successfully copied regular text from a form
 text field to a MySQL
 table but I've never tried rich text; I'm not even
 sure how to get rich text
 *into* a text field on a form. I might use a
 clipboard that is sensitive to
 rich text to get the rich text onto the form field
 but I wouldn't have
 thought of using it to transfer data between the
 form and MySQL. Therefore,
 I can't even visualize roughly how you're doing what
 you're doing let alone
 what sort of coding error you might have made. I
 suspect I speak for others
 on this list, too.
 
 Does your program store the data correctly if you
 just put regular text in
 the form field, rather than rich text? That might
 help determine if this is
 some kind of encoding/codepage problem.
 
 Rhino
 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Strange Text Field

2004-08-18 Thread Stuart Felenstein
In the table that fails, and the one that works, I'm
using some products from a company called Interakt.  I
mentioned this in my last reply, however didn't
mention one part.  
With this suite of tools , I can replace a text area
with a mini html / cms tool.  Basic formatting etc.
Now in the 2nd table where the insertion works. The
form works great, retains all the formatting of the
original document.

Stuart
--- Victor Pendleton [EMAIL PROTECTED] wrote:

 What is the application you are using to insert and
 retrieve the blob data?
 Is the data actually being inserted? 
 
 -Original Message-
 From: Stuart Felenstein
 To: [EMAIL PROTECTED]
 Sent: 8/18/04 2:49 PM
 Subject: Strange Text Field
 
 Hoping I can figure this out.  Using MySQl
 4.0.20-Standard. 
 
 I have a table (tried this both myISAM and Innodb)
 with 12 fields, 3 are ints, 7 are varchars and 1 is
 set to text.  
 Form is using a textarea for input into the text
 field.  Basically a copy and paste of rich text. 
 (I'm
 not concerned with formatting right now)
 
 Anyway it won't take and returns a vague SQL syntax
 error. If I try to input it directly into the
 database
 I get an error about the grid being 12 columns and
 the
 clipboard being 1 column.  Yet I had all the other
 fields filled in.  And all but the ID is set to
 allow
 nulls.
 
  Frustrated to figure out why this is occuring I
 created a table with 2 fields, one for the recordID,
 the other for the text dump.  Works like a charm.
 
 So has anyone seen this before ?  It seems odd ,
 I've
 searched the manual and bug base and came up with
 nothing. 
 
 Thank you ,
 Stuart
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:

http://lists.mysql.com/[EMAIL PROTECTED]
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:   

http://lists.mysql.com/[EMAIL PROTECTED]
 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Strange Text Field

2004-08-18 Thread Victor Pendleton
Are both of these fields defined as blob datatypes? Since one table works
and the other does not work this leads me to question whether the
application is performing consistently. Have you verified if data is entered
into that does not display as expected?

-Original Message-
From: Stuart Felenstein
To: Victor Pendleton; '[EMAIL PROTECTED] '
Sent: 8/18/04 3:14 PM
Subject: RE: Strange Text Field

In the table that fails, and the one that works, I'm
using some products from a company called Interakt.  I
mentioned this in my last reply, however didn't
mention one part.  
With this suite of tools , I can replace a text area
with a mini html / cms tool.  Basic formatting etc.
Now in the 2nd table where the insertion works. The
form works great, retains all the formatting of the
original document.

Stuart
--- Victor Pendleton [EMAIL PROTECTED] wrote:

 What is the application you are using to insert and
 retrieve the blob data?
 Is the data actually being inserted? 
 
 -Original Message-
 From: Stuart Felenstein
 To: [EMAIL PROTECTED]
 Sent: 8/18/04 2:49 PM
 Subject: Strange Text Field
 
 Hoping I can figure this out.  Using MySQl
 4.0.20-Standard. 
 
 I have a table (tried this both myISAM and Innodb)
 with 12 fields, 3 are ints, 7 are varchars and 1 is
 set to text.  
 Form is using a textarea for input into the text
 field.  Basically a copy and paste of rich text. 
 (I'm
 not concerned with formatting right now)
 
 Anyway it won't take and returns a vague SQL syntax
 error. If I try to input it directly into the
 database
 I get an error about the grid being 12 columns and
 the
 clipboard being 1 column.  Yet I had all the other
 fields filled in.  And all but the ID is set to
 allow
 nulls.
 
  Frustrated to figure out why this is occuring I
 created a table with 2 fields, one for the recordID,
 the other for the text dump.  Works like a charm.
 
 So has anyone seen this before ?  It seems odd ,
 I've
 searched the manual and bug base and came up with
 nothing. 
 
 Thank you ,
 Stuart
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:

http://lists.mysql.com/[EMAIL PROTECTED]
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:   

http://lists.mysql.com/[EMAIL PROTECTED]
 
 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Strange Text Field

2004-08-18 Thread Stuart Felenstein
Okay, still not working in this one table so here is
all my info:  I've also attached the table dump.

Thank you ,
Stuart

Error Code from attempted transaction:
-
Transaction failed!
Your SQL:
insert into LFWBank
(JobReferenceCode,VendorID,LocationCity,LocationState,AreaCode,PayRate,Contact,Contact
Email,TravelReq,FullSpec) values
(,11,'Bronx','AL',212,11,'Joe','[EMAIL PROTECTED]','no','
)
Error Msg:
You have an error in your SQL syntax. Check the manual
that corresponds to your MySQL server version for the
right syntax to use near 'Email,TravelReq,FullSpec)
values (,11,'Bronx','AL',212,11,'
---
My Code:
?php
//Connection statement
require_once('Connections/MYSQLWH.php');

//Aditional Functions
require_once('includes/functions.inc.php');

//load the tNG classes
require_once('tNG/KT_tNG.inc.php');

//KTML include files
require_once('ktml2/includes/ktedit/activex.php');

//start trigger UniVal1
//remove this line if you want to edit  the code by
hand
function KT_TriggerBEFORE_UniVal1($tNG) {
  $colNames =
Array(('JobReferenceCode'),('VendorID'),('LocationCity'),('LocationState'),('AreaCode'),('PayRate'),('Contact'),('Contact
Email'),('TravelReq'),('FullSpec'));
  $required =
Array((true),(false),(true),(false),(false),(false),(false),(false),(false),(true));
  $regExp =
Array(('(.|\n)*'),('(.|\n)*'),('(.|\n)*'),('(.|\n)*'),('-{0,1}\d+'),('(.|\n)*'),('(.|\n)*'),('(.|\n)*'),('(.|\n)*'),('(.|\n)*'));
  $labels = Array(('The value of the field
\'JobReferenceCode\' is incorrect!'),('The value of
the field \'VendorID\' is incorrect!'),('The value of
the field \'LocationCity\' is incorrect!'),('The value
of the field \'LocationState\' is incorrect!'),('The
value of the field \'AreaCode\' is incorrect!'),('The
value of the field \'PayRate\' is incorrect!'),('The
value of the field \'Contact\' is incorrect!'),('The
value of the field \'Contact Email\' is
incorrect!'),('The value of the field \'TravelReq\' is
incorrect!'),('The value of the field \'FullSpec\' is
incorrect!'));
  $uniVal = new UniValValidator($labels, $required,
$regExp, $tNG-nameToValue, $colNames);
  if (($err = $uniVal-validateFields()) != ) {
$tNG-setError(-1,$err);
  }
}
//end trigger UniVal1

//start trigger RollBack1
//remove this line if you want to edit  the code by
hand
function KT_TriggerERROR_RollBack1($tNG) {
  $keyQuote = $tNG-type2quote[NUMERIC_TYPE];
  $sql = delete from  . $tNG-getTable() .  where
JobID =  . $keyQuote . $tNG-getRecordId() .
$keyQuote;
  $tNG-connection-Execute($sql);
}
//end trigger RollBack1

// make an instance of the transaction object
$JobPostin = new KT_tNG();
// register to a connection
$JobPostin-setConnection($MYSQLWH);

// register the UniVal1 trigger
$JobPostin-registerTrigger(BEFORE,'KT_TriggerBEFORE_UniVal1',1);

// register the RollBack1 trigger
$JobPostin-registerTrigger(ERROR,'KT_TriggerERROR_RollBack1',0);

//set the STARTER condition
$JobPostin-registerTrigger(STARTER,'KT_TriggerSTARTER_Default',1,(isset($HTTP_POST_VARS['MM_insert'])
? $HTTP_POST_VARS['MM_insert'] : null));
$JobPostin-registerTrigger(ERROR,KT_TriggerERROR_ProduceFakeRs,1);
// set the autogeneration information
$JobPostin-setTransactionType(INSERT_TYPE);
$JobPostin-setTable('LFWJobBank');
$JobPostin-setColumnsName(Array(('JobReferenceCode'),('VendorID'),('LocationCity'),('LocationState'),('AreaCode'),('PayRate'),('Contact'),('Contact
Email'),('TravelReq'),('FullSpec')));
$JobPostin-setColumnsType(Array((NUMERIC_TYPE),(NUMERIC_TYPE),(STRING_TYPE),(STRING_TYPE),(NUMERIC_TYPE),(NUMERIC_TYPE),(STRING_TYPE),(STRING_TYPE),(STRING_TYPE),(STRING_TYPE)));
$JobPostin-setColumnsValue(Array(((isset($HTTP_POST_VARS['JobReferenceCode'])
? $HTTP_POST_VARS['JobReferenceCode'] :
null)),((isset($HTTP_POST_VARS['VendorID']) ?
$HTTP_POST_VARS['VendorID'] :
null)),((isset($HTTP_POST_VARS['LocationCity']) ?
$HTTP_POST_VARS['LocationCity'] :
null)),((isset($HTTP_POST_VARS['LocationState']) ?
$HTTP_POST_VARS['LocationState'] :
null)),((isset($HTTP_POST_VARS['AreaCode']) ?
$HTTP_POST_VARS['AreaCode'] :
null)),((isset($HTTP_POST_VARS['PayRate']) ?
$HTTP_POST_VARS['PayRate'] :
null)),((isset($HTTP_POST_VARS['Contact']) ?
$HTTP_POST_VARS['Contact'] :
null)),((isset($HTTP_POST_VARS['Contact_Email']) ?
$HTTP_POST_VARS['Contact_Email'] :
null)),((isset($HTTP_POST_VARS['TravelReq']) ?
$HTTP_POST_VARS['TravelReq'] :
null)),((isset($HTTP_POST_VARS['FullSpec']) ?
$HTTP_POST_VARS['FullSpec'] : null;

// execute the transaction
$JobPostin-executeTransaction();

// begin Recordset
$query_rsStates = SELECT USStates.States FROM
USStates;
$rsStates = $MYSQLWH-SelectLimit($query_rsStates) or
die($MYSQLWH-ErrorMsg());
$totalRows_rsStates = $rsStates-RecordCount();
// end Recordset

// default values for transaction JobPostin
if (!isset($KT_fakeRs)) {
  $KT_fakeRs = new fakeRecordSet();
  $KT_fakeRs-PrepareValue('JobReferenceCode', );
  

RE: Strange Text Field

2004-08-18 Thread Stuart Felenstein

--- Victor Pendleton [EMAIL PROTECTED] wrote:

 Are both of these fields defined as blob datatypes?

Yes, the two tables (one working, one not) both are
set to text (I realize Blob is basically the same)


 Since one table works
 and the other does not work this leads me to
 question whether the
 application is performing consistently. Have you
 verified if data is entered
 into that does not display as expected?

It actually works better then expected and doesn't
require me to do any insert of new lines or tabs.  All
the data was returned 100% perfect. 

Stuart

 
 -Original Message-
 From: Stuart Felenstein
 To: Victor Pendleton; '[EMAIL PROTECTED] '
 Sent: 8/18/04 3:14 PM
 Subject: RE: Strange Text Field
 
 In the table that fails, and the one that works, I'm
 using some products from a company called Interakt. 
 I
 mentioned this in my last reply, however didn't
 mention one part.  
 With this suite of tools , I can replace a text area
 with a mini html / cms tool.  Basic formatting etc.
 Now in the 2nd table where the insertion works. The
 form works great, retains all the formatting of the
 original document.
 
 Stuart
 --- Victor Pendleton [EMAIL PROTECTED] wrote:
 
  What is the application you are using to insert
 and
  retrieve the blob data?
  Is the data actually being inserted? 
  
  -Original Message-
  From: Stuart Felenstein
  To: [EMAIL PROTECTED]
  Sent: 8/18/04 2:49 PM
  Subject: Strange Text Field
  
  Hoping I can figure this out.  Using MySQl
  4.0.20-Standard. 
  
  I have a table (tried this both myISAM and Innodb)
  with 12 fields, 3 are ints, 7 are varchars and 1
 is
  set to text.  
  Form is using a textarea for input into the text
  field.  Basically a copy and paste of rich text. 
  (I'm
  not concerned with formatting right now)
  
  Anyway it won't take and returns a vague SQL
 syntax
  error. If I try to input it directly into the
  database
  I get an error about the grid being 12 columns and
  the
  clipboard being 1 column.  Yet I had all the other
  fields filled in.  And all but the ID is set to
  allow
  nulls.
  
   Frustrated to figure out why this is occuring I
  created a table with 2 fields, one for the
 recordID,
  the other for the text dump.  Works like a charm.
  
  So has anyone seen this before ?  It seems odd ,
  I've
  searched the manual and bug base and came up with
  nothing. 
  
  Thank you ,
  Stuart
  
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
 

http://lists.mysql.com/[EMAIL PROTECTED]
  
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:   
 

http://lists.mysql.com/[EMAIL PROTECTED]
  
  
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Strange Text Field

2004-08-18 Thread Stuart Felenstein

--- Rhino [EMAIL PROTECTED] wrote:
Sorry I didn't answer this one before.  No it does
not.
I typed 6 letters and it kicked it back.
And that was using just a regular text area
Stuart 
 
 
 Does your program store the data correctly if you
 just put regular text in
 the form field, rather than rich text? That might
 help determine if this is
 some kind of encoding/codepage problem.
 
 Rhino
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:   

http://lists.mysql.com/[EMAIL PROTECTED]
 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Strange Text Field

2004-08-18 Thread Dan Nelson
In the last episode (Aug 18), Stuart Felenstein said:
 Okay, still not working in this one table so here is all my info:
 I've also attached the table dump.
 
 Thank you ,
 Stuart
 
 Error Code from attempted transaction:
 -
 Transaction failed!
 Your SQL:
 insert into LFWBank
 (JobReferenceCode,VendorID,LocationCity,LocationState,AreaCode,PayRate,Contact,Contact
 Email,TravelReq,FullSpec) values
 (,11,'Bronx','AL',212,11,'Joe','[EMAIL PROTECTED]','no','
 )

I can't be sure due to the word-wrapping your client performed on these
lines, but is one of your field names Contact Email with a space in
it?  If so, you'll have to escape it with backtics: `Contact Email`

Renaming the field might be better though.


-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Strange Text Field

2004-08-18 Thread Stuart Felenstein
Dan, 

Don't hate me for saying this but you are the MAN!
Yep, it was Contact Email.  Oops ! 

It works great now

Thank you all!

Stuart
--- Dan Nelson [EMAIL PROTECTED] wrote:

 In the last episode (Aug 18), Stuart Felenstein
 said:
  Okay, still not working in this one table so here
 is all my info:
  I've also attached the table dump.
  
  Thank you ,
  Stuart
  
  Error Code from attempted transaction:
  -
  Transaction failed!
  Your SQL:
  insert into LFWBank
 

(JobReferenceCode,VendorID,LocationCity,LocationState,AreaCode,PayRate,Contact,Contact
  Email,TravelReq,FullSpec) values
 

(,11,'Bronx','AL',212,11,'Joe','[EMAIL PROTECTED]','no','
  )
 
 I can't be sure due to the word-wrapping your client
 performed on these
 lines, but is one of your field names Contact
 Email with a space in
 it?  If so, you'll have to escape it with backtics:
 `Contact Email`
 
 Renaming the field might be better though.
 
 
 -- 
   Dan Nelson
   [EMAIL PROTECTED]
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]