Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools
mysql error, help >_< Details »»
mysql error, help >_<
Version: , by Takara Takara is offline
Developer Last Online: Oct 2009 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-24-2002 Last Update: Never Installs: 0
 
No support by the author.

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?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-24-2002, 12:49 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Install 2.2.6 to fix this problem, or apply the PHP 4.2.x-related patches from vBulletin.com.
Reply With Quote
  #3  
Old 06-24-2002, 01:08 PM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 06-24-2002, 05:43 PM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

>_< I need to ban someone but It just gives me the error, there has to be something I can do shorterm @_@;
Reply With Quote
  #5  
Old 06-24-2002, 05:50 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 06-24-2002, 05:52 PM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

I'm so stupid. Sorry, thank thanks *updates*
Reply With Quote
  #7  
Old 06-24-2002, 11:55 PM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Phew, all upgraded!

*continues slowly updating her files O.o*

Thanks both of you ^^
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:33 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.03937 seconds
  • Memory Usage 2,257KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete