vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Sql problem (https://vborg.vbsupport.ru/showthread.php?t=56810)

lasto 09-06-2003 08:07 AM

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

assassingod 09-06-2003 10:03 AM

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

Uninstall the last hack you installed and try again

lasto 09-06-2003 01:55 PM

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

oh well

noppid 09-06-2003 02:28 PM

look at the very first SET val..

PHP Code:

candeleteusercomments = , 

It should be...
PHP Code:

candeleteusercomments ''

Empty single quotes.

lasto 09-06-2003 03:46 PM

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)."'

assassingod 09-06-2003 05:09 PM

use

PHP Code:

candeleteusercomments='$candeleteusercomments' 


lasto 09-06-2003 05:37 PM

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

filburt1 09-06-2003 05:40 PM

Right before the query, add:
PHP Code:

$candeleteusercomments intval($candeleteusercomments); 


lasto 09-06-2003 05:55 PM

$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

filburt1 09-06-2003 07:44 PM

Quote:

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


All times are GMT. The time now is 10:52 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.01250 seconds
  • Memory Usage 1,739KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete