Hi All,
I have an identical database on both a Linux box as well as an IIS machine with PHP installed. The linux version of my database works fine. My IIS server is giving me the following error upon doing a seach of the database:
"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 'like '%%'' at line 1"
The code that's causing the problem is this:
$searchresults = mysql_query("SELECT * FROM CONTACTS WHERE ".$searchtype." like '%".$searchterm."%'")
or die(mysql_error());
$result = mysql_query($searchresults);
Anyone got any ideas on this one or am I missing something glaringly obvious?
TIA,
Denise