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? 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. 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? Link to comment https://forums.phpfreaks.com/topic/198508-sql-syntax-error/#findComment-1041634 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.