mysql_query('SELECT ID
FROM documents
WHERE (Key="' .$theKey. '"
AND Value="' .$theValue. '")');
Isn’t this right? Also tried with a semicolon at the end of the string, but no luck. Driving me crazy, PHP keeps spitting out:
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="title" AND Value="Lollercoaster")' at line 1
It works if I remove the WHERE clause