View Full Version : Sql problem
lasto
09-06-2003, 08:07 AM
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..
candeleteusercomments = ,
It should be...
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
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:
$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
Today at 02:40 PM filburt1 said this in Post #8 (https://vborg.vbsupport.ru/showthread.php?postid=431780#post431780)
Right before the query
assassingod
09-06-2003, 08:55 PM
$candeleteusercomments = intval($candeleteusercomments);
$DB_site->query("UPDATE usergroup SET $candeleteusercomments = intval($candeleteusercomments);candeleteusercommen ts='$candeleteusercomments',title=
Try that
lasto
09-06-2003, 09:56 PM
cheers filburt and assassingod will post 2morrow how i got on
done me nut in so i removed all candelete comments from the usergroup.php
also i notice u have it in there twice now assassingod is that correct ?
top line and then in the Dbquery as well
assassingod
09-07-2003, 07:58 AM
Yes, its for edit/add and update/insert (same with user.php)
Its basically for when you edit a usergroup or add a usergroup
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.