paulman888888 Posted January 5, 2009 Share Posted January 5, 2009 Hello; I keep getting this error MySql Error Which is not really an error because it doesnt tell whats wrong. Here's my code $check=mysql_query("UPDATE chess_events SET delete='$delete' WHERE id='" . mysql_real_escape_string($id) . "' ")or die(mysql_error); Please can you tell me what i have done wrong and why MySql Doesn't Give Me An Error! Thankyou Paul Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 5, 2009 Share Posted January 5, 2009 your error checking is wrong...it should be: $check=mysql_query("UPDATE chess_events SET delete='$delete' WHERE id='" . mysql_real_escape_string($id) . "' ")or die(mysql_error()); but the problem is with your field "delete". delete is a reserved word, and it's bad practice to use it as a field name. if you can, change it (maybe use 'removed' instead). if you can change it, use backticks to escape it: $check=mysql_query("UPDATE chess_events SET `delete`='$delete' WHERE id='" . mysql_real_escape_string($id) . "' ")or die(mysql_error()); Quote Link to comment 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.