View Full Version : Another SQL error...
razorownz
01-29-2004, 04:51 AM
Database error in vBulletin 2.3.4:
Invalid SQL: SELECT * FROM moderator WHERE userid= AND canviewprofile=1
mysql error: You have an error in your SQL syntax near 'AND canviewprofile=1' at line 1
mysql error number: 1064
Date: Wednesday 28th of January 2004 10:57:12 PM
Script: http://www.worldofcars.nu/forum/forum/moderator.php?s=&action=useroptions&userid=25
Referer:
I dont know where its appearing since I recieved it in email as a report. Does any1 know ?
Zachery
01-29-2004, 04:55 AM
Database error in vBulletin 2.3.4:
Invalid SQL: SELECT * FROM moderator WHERE userid= AND canviewprofile=1
mysql error: You have an error in your SQL syntax near 'AND canviewprofile=1' at line 1
mysql error number: 1064
Date: Wednesday 28th of January 2004 10:57:12 PM
Script: http://www.worldofcars.nu/forum/forum/moderator.php?s=&action=useroptions&userid=25
Referer:
I dont know where its appearing since I recieved it in email as a report. Does any1 know ?
it was generated by one of your moderators id guess
razorownz
01-29-2004, 05:09 AM
i dont have any mods
g-force2k2
01-29-2004, 08:13 AM
razorownz,
open moderator.php
And make sure that this code exists in the moderator.php file
WHERE userid=$bbuserinfo[userid] AND canviewprofile=1
Because thats the line of coding thats not working or has been altered. The $bbuserinfo[userid] should produce an idea, but in the error it is not, this could also exist because perhaps and unauthorized user is accessing this page.
Regards,
g-force2k2
razorownz
01-29-2004, 09:19 AM
okay and if it doesnt exist, where do i put it?
razorownz
01-29-2004, 09:19 AM
that line looks like this:
} elseif ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1")) {
which exists in the moderator.php file
g-force2k2
01-29-2004, 04:04 PM
razorownz,
that is the correct problem, perhaps one way to fix this problem would be to add:
if ( !$bbuserinfo['userid'] ) :
show_nopermission ( ) ;
endif ;
after:
require ( './global.php' ) ;
Hopefully that will solve your problem.
Cheers,
g-force2k2
razorownz
01-29-2004, 04:28 PM
ive uploaded the new moderator.php with the stated changes, we'll see if any more errors occur... thanks once again
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.