Jump to content
GrahamMercer

code debug help please?

Recommended Posts

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

Share this post


Link to post
Share on other sites

It looks like $mrid does not have a value.

Share this post


Link to post
Share on other sites

$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...!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...