[SOLVED] Search query
Posted: Mon Feb 21, 2005 10:39 am
The query below works fine in my system up to this point - now when implementing this query and changing the fields the query has stopped working and I get the following error message:
Error in query: You have an error in your SQL syntax near 'WHERE orgname LIKE 'the text I input%'' at line 5
heres the code:
can anyone see anything wrong with this??
Error in query: You have an error in your SQL syntax near 'WHERE orgname LIKE 'the text I input%'' at line 5
heres the code:
Code: Select all
foreach($HTTP_POST_VARS as $varname => $value)
$formVarsї$varname]=$value;
$query = "SELECT
orgname, web_url,sector,org_id,person_id,
notes FROM organisations ORDER BY orgname ASC
WHERE orgname LIKE '$formVarsїorgname]%'";