GrahamMercer Posted November 28, 2014 Share Posted November 28, 2014 I am getting the following error message SQL 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 'order by RaceSetupID' at line 1 SQL errno: 1064 SQL: select * from hesketh_racesetups where IndividualRaceID = order by RaceSetupID The offending line of code is $sql = "select * from xxxxxxx_racesetups where IndividualRaceID = $mrid order by RaceSetupID"; ($mrid is previously set by the line $mrid = $row->IndividualRaceID;) Thanks for any help that can be offered Graham Link to comment Share on other sites More sharing options...
Ingolme Posted November 28, 2014 Share Posted November 28, 2014 It looks like $mrid does not have a value. Link to comment Share on other sites More sharing options...
GrahamMercer Posted November 29, 2014 Author Share Posted November 29, 2014 Ok thanks, I will look into that. Link to comment Share on other sites More sharing options...
srinivas g Posted December 5, 2014 Share Posted December 5, 2014 $sql = "select * from xxxxxxx_racesetups where IndividualRaceID = $mrid order by RaceSetupID"; try to write in single quote like '$mrid' if the $mrid value is not a number and try...! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now