nevermind...instead of using '||' to concat the fields i needed to use the CONCAT() function. So the syntax should have been:
insert into table (key, field) values (1, CONCAT('test',CHAR(59), ' string')); still...I wonder why I got a 'Query OK, 1 row affected' message.... -Don > -----Original Message----- > From: Don Vu > Sent: Monday, April 08, 2002 11:08 AM > To: MySQL Mailing List (E-mail) > Subject: char() function > > Hi guys, > > Our java code blows up when we try to insert a string with a ';' inside of it. So we >tried to do a work-around by replacing ';' with '||CHAR(59)||' to insert it, using >the char function and the character's respecitve ascii value. So instead of: > > insert into table (key, field) values (1, 'test;string'); > > we had: > > insert into table (key, field) values (1, 'test'||CHAR(59)||' string'); > > it seems to work initially...(Query OK, 1 row affected (0.00 sec)) but when I try to >select the value of the field I get just the value '0' (string of zero). > > Anyone know what gives? If not, any ideas on another way to handle the problem? It >seemed like the CHAR() function was made for situations like this.... > > thanks, > Don --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php