Jump to content


Photo

SQL syntax error in admin panel


  • Please log in to reply
5 replies to this topic

#1 shotoutofnowhere

shotoutofnowhere
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 02 August 2006 - 02:31 AM

When ever we try and make a user a moderator we get this error. I am completely new to this can anybody tell me how to fix this? It is on our forums and it worked on adding an admin as a moderator but it won't let a regular user be a moderator.

Could not obtain moderator status

DEBUG MODE

SQL Error : 1064 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 aa.group_id = ug.group_id AND aa.auth_mod = 1 GROUP BY ug.' at line 3

SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod FROM nuke_bbauth_access aa, nuke_bbuser_group ug WHERE ug.user_id IN () AND aa.group_id = ug.group_id AND aa.auth_mod = 1 GROUP BY ug.user_id

Line : 528
File : admin_ug_auth.php

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 August 2006 - 02:48 PM

Well, you can't have an empty IN() clause, that's the error.  The software should account for this boundary case.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 shotoutofnowhere

shotoutofnowhere
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 02 August 2006 - 07:27 PM

All right how do we get rid of it though and to make it work?

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 August 2006 - 09:32 PM

There are a few options... I'm assuming you can modify the source code.  Either have an assertion that removes the IN clause if it's empty, or add in a value that you know can never be found (e.g. a NULL for a non-NULL column).
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 shotoutofnowhere

shotoutofnowhere
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 02 August 2006 - 10:13 PM

Well I noticed something today this is displayed at the bottom of the admin panel.

Your installation does not seem to be up to date. Updates are available for your version of phpBB, please visit http://www.phpbb.com/downloads.php to obtain the latest version.
The latest available version is phpBB 2.0.21.You are running phpBB 2.0.15.

we are using Nuke is there an easy way to just update phpBB and see if this takes care of our problem?

#6 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 August 2006 - 11:37 PM

That's beyond the scope of my knowledge... I know nothing about phpBB.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users