Page 1 of 1

Safe characters in MySQL

Posted: Sun Feb 18, 2007 9:45 am
by user___
Hi guys,
I would like to ask you about all the characters that can be used in MySQL safely. I have a kindof a list but I need all of them. I want only characters like:"?+!" but not any letters.

Posted: Sun Feb 18, 2007 9:54 am
by feyd
Used in MySQL where? How is this a PHP question?

Reply

Posted: Sun Feb 18, 2007 10:12 am
by user___
Well, I have a class which exectutes queries and I need a kind of a filter to protect any kind of SQL injection.

Posted: Sun Feb 18, 2007 10:16 am
by feyd
filtration would need to be based on the data you are storing, not so much on MySQL. mysql_real_escape_string() is used to prepare data once you've filtered it.