Safe characters in MySQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Safe characters in MySQL

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Used in MySQL where? How is this a PHP question?
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

Reply

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply