CoRnNuB Posted August 12, 2010 Share Posted August 12, 2010 can someone tell me how i can fix this please ive tried so many times but nothing seems to work 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 != 89 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 != 89 AND u.user_level != 0 ? Quote Link to comment Share on other sites More sharing options...
CoRnNuB Posted August 12, 2010 Author Share Posted August 12, 2010 and ive got this on viewuser 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 Query was SELECT * FROM referals WHERE refREFER= Quote Link to comment Share on other sites More sharing options...
Dayo Posted August 12, 2010 Share Posted August 12, 2010 1. Your strength ist defined 2. Your reREFER isn't defined Make sure in the query it has $ir[('strength' || 'userid')] Quote Link to comment Share on other sites More sharing options...
CoRnNuB Posted August 12, 2010 Author Share Posted August 12, 2010 would u be able to pm me it in more details as i dont quit unerstand what u mean it was working a few days back now its not Quote Link to comment Share on other sites More sharing options...
Paul Evans Posted August 13, 2010 Share Posted August 13, 2010 [mysql]SELECT count FROM `userstats` us LEFT JOIN `users` u ON us.`userid`=u.`userid` WHERE us.`strength` > {$ir['strength']} AND us.userid != $userid AND u.user_level != 0[/mysql]If i recall you would also need to identify what your counting but i maybe wrong, that would work im sure if your running on $ir and $userid Quote Link to comment 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.