fallenangel1983 Posted April 2, 2008 Share Posted April 2, 2008 Hey guys. Can someone tell me what is up with this query. Its driving me crazy. $updateevent="UPDATE events SET solved = 'Y' WHERE solID = '$solID'"; $result=mysql_query(updateevent) or die(mysql_error()); The table i am trying to put this in is the events table. Column solved is of TYPE VARCHAR and has a max length of 3 $solID is set to 26 There is definately a row where solID = 26 and currently the solved column reads 'N'. however when I try it.. I get 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 'updateevent' at line 1 Quote Link to comment https://forums.phpfreaks.com/topic/99200-solved-mysql-query-trouble/ Share on other sites More sharing options...
paul2463 Posted April 2, 2008 Share Posted April 2, 2008 here is your problem, the clue is in the error....... updateevent.... $updateevent="UPDATE events SET solved = 'Y' WHERE solID = '$solID'"; $result=mysql_query($updateevent) or die(mysql_error()); //you missed off the dollar sign to the query statement call Quote Link to comment https://forums.phpfreaks.com/topic/99200-solved-mysql-query-trouble/#findComment-507559 Share on other sites More sharing options...
fallenangel1983 Posted April 2, 2008 Author Share Posted April 2, 2008 My God how embarrassing. thanks a lot. careless mistake. cheers for bothering with me lol. Quote Link to comment https://forums.phpfreaks.com/topic/99200-solved-mysql-query-trouble/#findComment-507564 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.