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 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 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. Link to comment https://forums.phpfreaks.com/topic/99200-solved-mysql-query-trouble/#findComment-507564 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.