Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 09-06-2003, 08:07 AM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Sql problem

but aint got a clue whys its doing it

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: UPDATE usergroup SET candeleteusercomments = , title='Registered',usertitle='',cancontrolpanel=0, canmodifyprofile=1,canviewmemb ers=1,canview=1,showgroup=0,cansearch=1,canemail=0 ,canpostnew=1,canmove=0,canope nclose=0,candeletethread=0,canreplyown=1,canreplyo thers=1,canviewothers=1,canedi tpost=1,candeletepost=0,canusepm=1,canpostpoll=1,c anvote=1,canpostattachment=1,i smoderator=0,canpublicedit=0,canpublicevent=0,cant hreadrate=1,cantrackpm=0,cande nypmreceipts=0,maxbuddypm=5,maxforwardpm=5,canwhos online=0,canwhosonlineip=0,can getattachment=1 WHERE usergroupid=2
mysql error: You have an error in your SQL syntax near ' title='Registered',usertitle='',cancontrolpanel=0, canmodifyprofile=1,canviewmem' at line 1

mysql error number: 1064

Date: Saturday 06th of September 2003 09:54:51 AM

anyone tell me how to fix this error - board runs fine but i get this when i got to update access levels
Reply With Quote
  #2  
Old 09-06-2003, 10:03 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You haven't edited a file properly (admin/user.php by the looks of it)

Uninstall the last hack you installed and try again
Reply With Quote
  #3  
Old 09-06-2003, 01:55 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cheers much appreciated had me baffled this cause the hack works fine as well

oh well
Reply With Quote
  #4  
Old 09-06-2003, 02:28 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

look at the very first SET val..

PHP Code:
candeleteusercomments = , 
It should be...
PHP Code:
candeleteusercomments ''
Empty single quotes.
Reply With Quote
  #5  
Old 09-06-2003, 03:46 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im well stuck been though usergroup.php and i cant find this

candeleteusercomments = ,

this is from the hack - usercomments in user profile page

5. In admin/usergroup.php, find (not an entire line):

$DB_site->query("INSERT INTO usergroup (usergroupid

Replace with (not an entire line):

$DB_site->query("INSERT INTO usergroup (candeleteusercomments, usergroupid

6. In admin/usergroup.php, find (not an entire line):

$DB_site->query("UPDATE usergroup SET title='".addslashes($title)."'

Replace with (not an entire line):

$DB_site->query("UPDATE usergroup SET candeleteusercomments = $candeleteusercomments, title='".addslashes($title)."'
Reply With Quote
  #6  
Old 09-06-2003, 05:09 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

use

PHP Code:
candeleteusercomments='$candeleteusercomments' 
Reply With Quote
  #7  
Old 09-06-2003, 05:37 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: INSERT INTO usergroup (candeleteusercomments, usergroupid,title,usertitle,cancontrolpanel,canmod ifyprofile,canviewmembers,canv iew,showgroup,cansearch,canemail,canpostnew,canmov e,canopenclose,candeletethread ,canreplyown,canreplyothers,canviewothers,caneditp ost,candeletepost,canusepm,can postpoll,canvote,canpostattachment,ismoderator,can publicevent,canpublicedit,cant hreadrate,cantrackpm,candenypmreceipts,maxbuddypm, maxforwardpm,canwhosonline,can whosonlineip,cangetattachment)
VALUES (NULL,'1','1',0,1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,1,1, 1,1,0,0,0,1,0,0,0,0,1,0,1)
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

well weird still stuck i can do everything but add new usergroups
Reply With Quote
  #8  
Old 09-06-2003, 05:40 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right before the query, add:
PHP Code:
$candeleteusercomments intval($candeleteusercomments); 
Reply With Quote
  #9  
Old 09-06-2003, 05:55 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$DB_site->query("UPDATE usergroup SET $candeleteusercomments = intval($candeleteusercomments);candeleteusercommen ts='$candeleteusercomments',ti tle=

thats just first part of the query but gives me same error

Invalid SQL: INSERT INTO usergroup (candeleteusercomments, usergroupid,title,usertitle,cancontrolpanel,canmod ifyprofile,canviewmembers,canv iew,showgroup,cansearch,canemail,canpostnew,canmov e,canopenclose,candeletethread ,canreplyown,canreplyothers,canviewothers,caneditp ost,candeletepost,canusepm,can postpoll,canvote,canpostattachment,ismoderator,can publicevent,canpublicedit,cant hreadrate,cantrackpm,candenypmreceipts,maxbuddypm, maxforwardpm,canwhosonline,can whosonlineip,cangetattachment)
VALUES (NULL,'1','1',0,1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,1,1, 1,1,0,0,0,1,0,0,0,0,1,0,1)
mysql error: Column count doesn't match value count at row 1
Reply With Quote
  #10  
Old 09-06-2003, 07:44 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 02:40 PM filburt1 said this in Post #8
Right before the query
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:44 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05773 seconds
  • Memory Usage 2,248KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete