I am working with an existing database table that holds user information identified by strange id strings. The id strings are created by another application, so I can not change them, but I need to be able to query the table using them as reference. Each ID is a 3 character string like:

!#^
$%"
!!"
#"&

etc.

The problem I am having is when I try to search for a user with a string that has a ' or a " in it, because the sql throws an error.
The id inserted into the query, so I end up with something like:


select * from table where id=!&" and mysql complains!

Is there any way to write this so that mysql will accept it?
If not, I'll have to pull all info and hold in arrays for comparison, which I'd rather not do...

Thanks for any ideas :)

steve

____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to