Re: Insert statement with an ' in it

2003-06-28 Thread Alfredo J. Cole
El Sáb 28 Jun 2003 12:24, Zachary Perschall escribió: > 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 st

Re: Insert statement with an ' in it

2003-06-28 Thread Andrew Pierce
Well, the easiest thing is to "escape" any single quotes with a backslash character (\). PHP includes a function named addslashes() that does this. http://us4.php.net/manual/en/function.addslashes.php Same logic applies in other languages. Hope this helps. Andrew > Help! I'm trying to do an

Re: Insert statement with an ' in it

2003-06-28 Thread nospam
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 statemen

Insert statement with an ' in it

2003-06-28 Thread Zachary Perschall
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 informa