$sql = sprintf("SELECT * FROM options WHERE(key = '%s')", mysql_real_escape_string($option));
It give me this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key = 'test'' at line 1
Question
RoomKid
I honestly don't know why this is happening.
I'm using this to query my database:
$sql = sprintf("SELECT * FROM options WHERE(key = '%s')", mysql_real_escape_string($option));
It give me this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key = 'test'' at line 1
I've give up, anyone?
Thanks :D
Link to comment
Share on other sites
4 answers to this question
Recommended Posts