why don't you just insert your values after you escaped some special characters? 
specifically, you have to replace all ' by \' (prepend a single backslash character), 
and everything works fine!

i guess you do your INSERTs from out of some programming language, like PHP, Perl or 
C. just use the appropriate str_replace() functions of that language to replace those 
apostrophes.

-yves

 
-----Ursprüngliche Nachricht----- 
Von: "Zachary Perschall" <[EMAIL PROTECTED]>
An: <[EMAIL PROTECTED]>
Gesendet: Samstag, 28. Juni 2003 20:24
Betreff: Insert statement with an ' in it 


Help! I'm trying to do an insert statement where one of the fields sometimes contains 
an apostrophe. The field type is a varchar. Everytime that one of these  values comes 
up with an apostrophe, it tells me there is an error in my SQL statement (obviously 
because it thinks there are more information than there are fields I'm inserting 
into....)

I'm sure this is something simple, but I can't seem to find the answer on the web. 
Please help!

-Zach


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

Reply via email to