vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   mysql error, help >_< (https://vborg.vbsupport.ru/showthread.php?t=40228)

Takara 06-24-2002 11:23 AM

mysql error, help >_<
 
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

This is the code around the area:

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;
  }

I hadnt done anything recently, except add log's thread subscribe hack.. but that edits showthread.php, not user.php

Can anyone give me a hand?

Admin 06-24-2002 12:49 PM

Install 2.2.6 to fix this problem, or apply the PHP 4.2.x-related patches from vBulletin.com.

Takara 06-24-2002 01:08 PM

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?

Takara 06-24-2002 05:43 PM

>_< I need to ban someone but It just gives me the error, there has to be something I can do shorterm @_@;

Steve Machol 06-24-2002 05:50 PM

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

Takara 06-24-2002 05:52 PM

Oooooohhhhh, I searched through the member area for the upgrade, but didnt find it. lol

I'm so stupid. Sorry, thank thanks *updates*

Takara 06-24-2002 11:55 PM

Phew, all upgraded!

*continues slowly updating her files O.o*

Thanks both of you ^^


All times are GMT. The time now is 10:00 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01076 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete