The Arcive of vBulletin Modifications Site. |
|
mysql error, help >_< Details »»
|
|||||||||||||||||||||||||
Whenever I go to the admin CP, then to edit a user I get the following error message (it occours for every user, not just 'Takky'):
Code:
Database error in vBulletin Control Panel 2.2.5: Invalid SQL: SELECT userid FROM user WHERE username='Takky' AND userid <> mysql error: You have an error in your SQL syntax near '' at line 4 mysql error number: 1064 Date: Monday 24th of June 2002 08:14:46 AM Script: http://myforums/admin/user.php Referer: http://myforums/admin/user.php?s=&action=edit&userid=15 Code:
// ###################### Start do update #######################
if ($HTTP_POST_VARS['action']=="doupdate") {
if (!isset($ausername) or $ausername == '') {
echo "<p>You did not give this user an username</p>";
exit;
}
if ($exists=$DB_site->query_first("SELECT userid
FROM user
WHERE username='".addslashes(htmlspecialchars($ausername))."'
AND userid <> $userid")) {
echo "There is already an ".makelinkcode('user',"user.php?do=edit&userid=$exists[userid]",1)." named <b>".htmlspecialchars($ausername)."</b>";
exit;
}
// check that not removing last admin
$countadmin=$DB_site->query_first("SELECT COUNT(*) AS users FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1 AND user.userid<>$userid");
$getperms=$DB_site->query_first("SELECT cancontrolpanel FROM usergroup WHERE usergroupid=$usergroupid");
if ($countadmin[users]==0 and $getperms[cancontrolpanel]!=1) {
echo "<p>You are about to edit the last user with control panel access so that they do not have control panel access. This would lock you out of the control panel, so you cannot proceed.</p></body></html>";
exit;
}
Can anyone give me a hand? Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Install 2.2.6 to fix this problem, or apply the PHP 4.2.x-related patches from vBulletin.com.
|
|
#3
|
||||
|
||||
|
I'm slowly moving all my hacks over to 2.2.6, but I have to check each file for changes and then after all that I'm sure there will be errors I have to check. It didnt pop up until just now, what is there that I can do until I've got all my files upgraded and ready?
|
|
#4
|
||||
|
||||
|
>_< I need to ban someone but It just gives me the error, there has to be something I can do shorterm @_@;
|
|
#5
|
||||
|
||||
|
FireFly already told you how to fix this. You need to either upgrade to vB 2.2.6 OR apply the patched files in freddie's post here:
http://www.vbulletin.com/forum/showt...threadid=44820 |
|
#6
|
||||
|
||||
|
Oooooohhhhh, I searched through the member area for the upgrade, but didnt find it. lol
I'm so stupid. Sorry, thank thanks *updates* |
|
#7
|
||||
|
||||
|
Phew, all upgraded!
*continues slowly updating her files O.o* Thanks both of you ^^ |
![]() |
|
|