Guest_imported
New member
- Jan 1, 1970
- 0
Hi
Why is it when I perform a command in PHP such as below it fails (i.e. no records are returned):
SELECT * FROM my_table WHERE field_name='Here\'s a test'
I have the situation where the field contents may include chars such as ' or "
I am ensuring addslashes is performed before writing the data to the database (I currently have Magic Quotes turned off), and in this case at least one record has this field set as "Here\'s a test"
Surely this isn't a limitation of the WHERE clause?
Regards
Andrew Blee.
Why is it when I perform a command in PHP such as below it fails (i.e. no records are returned):
SELECT * FROM my_table WHERE field_name='Here\'s a test'
I have the situation where the field contents may include chars such as ' or "
I am ensuring addslashes is performed before writing the data to the database (I currently have Magic Quotes turned off), and in this case at least one record has this field set as "Here\'s a test"
Surely this isn't a limitation of the WHERE clause?
Regards
Andrew Blee.