PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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
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]%'";
$query = "SELECT orgname, web_url,sector,org_id,person_id,
notes FROM organisations WHERE orgname LIKE '{$formVarsї'orgname']}%' ORDER BY orgname";