aebstract Posted April 14, 2010 Share Posted April 14, 2010 mysql_query("UPDATE participants t1 JOIN registrations t2 ON (t1.regid = t2.id) SET `cr` = 'ql' WHERE class = '$_GET[class]' && eventid = '$_GET[event]'") or die(mysql_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 '' at line 1 After I ran the query and got this error, I checked my database and it appears that all of the rows are updating correctly, but I'm left with this blank page error and I need to be redirected. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/198508-sql-syntax-error/ Share on other sites More sharing options...
Ken2k7 Posted April 14, 2010 Share Posted April 14, 2010 I guessing it's because you messed up interpolating variables. I never liked tossing variables freely in a string. It looks messy and you run into problems such as that. Quote Link to comment https://forums.phpfreaks.com/topic/198508-sql-syntax-error/#findComment-1041623 Share on other sites More sharing options...
aebstract Posted April 14, 2010 Author Share Posted April 14, 2010 What do you mean? Quote Link to comment https://forums.phpfreaks.com/topic/198508-sql-syntax-error/#findComment-1041634 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.