Jump to content
MakeWebGames

random problem


spikereloaded

Recommended Posts

hey guys

one of my users is getting this error:

QUERY 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 'AND us.userid != 135 AND u.user_level != 0' at line 1

Query was SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.strength > AND us.userid != 135 AND u.user_level != 0

i cant seem to work out why. no one else seems to be having this problem. he says this appears when he clicks on the gym.

thanks

Link to comment
Share on other sites

this is your query

SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.strength > AND us.userid != 135 AND u.user_level != 0

Notice the WHERE us.strength > AND it's saying WHERE strength is larger than oopsy! we're missing here something AND

Find the query in the php code, and make sure there is some variable there, and that it is set.

Link to comment
Share on other sites

That's something I can't tell you. Either he's doing something he shouldn't. This could happen via unchecked input on forms. Or something goes wrong when retrieving the value.

Another possibility is that he doesn't have any value in the database for that variable. In that case, you might have a structural problem though.

Link to comment
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.

×
×
  • Create New...