Re: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread jeffrey_n_Dyke
if you're using php to generate this query you could use addslashes() to the piece that is holding 11301201 0603A HKA 3902 #3708_JD's AE Exp. this will escape the slashes making them \' similarly if you're getting \' in your return values you can use stripslashes() www.php.net/addslashes www.p

Re: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread CPT John W. Holmes
From: "Dillon, John" <[EMAIL PROTECTED]> > How do I avoid the problem in the subject hereto? SELECT query uses > variable in the WHERE clause. Fails on the following query: > > SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A HKA 3902 #3708_JD's > AE Exp' AND ... Escape the single quote w

RE: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread Andy Green
try putting a \ before the apostrophe -Original Message- From: Dillon, John [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 12:59 PM To: 'PHP-DB' Subject: [PHP-DB] MySQL query failing on apostrophe in data How do I avoid the problem in the subject hereto? SELECT query uses va

RE: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread Jennifer Goodie
> How do I avoid the problem in the subject hereto? SELECT query uses > variable in the WHERE clause. Fails on the following query: > > SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A HKA 3902 #3708_JD's > AE Exp' AND ... Escape it. SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A