Don't know which database you're using but in Oracle you would use:

Select * from tblContacts, tblCountries WHERE 
(tblContacts.CountryCode=tblCountries.CountryID) AND (Organization LIKE 
'%o''mallies%' )

Escape(\) is only used in PHP syntax, not SQL.

Regards


-----Original Message-----
From: Paul Dionne [mailto:PDionne@;Speakeasy.net]
Sent: Tuesday, November 05, 2002 5:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] addslashes/stripslashes


Hey,

I am trying to develop a search for my database.

I used addslashes when entering the data, and then use addslashes with the 
search but nothing comes up:

Select * from tblContacts, tblCountries WHERE 
(tblContacts.CountryCode=tblCountries.CountryID) AND (Organization LIKE 
'%o\'mallies%' )

I check in the database and o'mallies is indeed there as o\'mallies.  And a 
search for just mallies works fine. 

What gives?

Thanks
Paul

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to