PDA

View Full Version : Malformed SQL Query


Kaelon
01-26-2004, 08:39 PM
Hi, Gang,

So, I've run into a bit of a problem with Mike's Warning System for vB 2.3.x Series, and specifically, it involves a malformed query.

It seems like a malformed query when trying to edit a user that has been automatically banned by the system (i.e., placed in the banned usergroup). Even when the warning period has expired, I can't seem to be able to move back the banned user to the active usergroups. Thoughts?

The exact error message I receive:

Database error in vBulletin Control Panel 2.3.2:

Invalid SQL: UPDATE user SET birthday='1971-05-23',options='15',usergroupid='10',username='Melega unt Tanthul',email='Bevin_van_liempt@hotmail.com',styl eid='0',parentemail='',coppauser=0,homepage='',icq ='309268104',aim='Whiterose1234321',yahoo='',signa ture='White pants, white shirt , white gloves, white boots, white hair, and white eyes (glowing). His beloved warlord sword, \"Demonslayer\" is elven steel, white, glittering, and bears the likeness of a whiterose. It\'s sheath is white elven steel. Its hilt is sweat absorbant.',adminemail=1,showemail=1,invisible=0,u sertitle='Companion',customtitle=0,joindate=UNIX_T IMESTAMP('2003-12-24 03:18:11'),cookieuser=1,nosessionhash=1,daysprune= '1000',lastvisit=UNIX_TIMESTAMP('2004-01-25 20:15:18'),lastactivity=UNIX_TIMESTAMP('2004-01-25 20:43:15'),lastpost=UNIX_TIMESTAMP('2004-01-25 15:22:19'),posts='97',timezoneoffset='-8',emailnotification=0,receivepm='1',emailonpm='1' ,ipaddress='206.116.243.178',pmpopup=IF(pmpopup=2 AND =1,pmpopup,'') WHERE userid=12221
mysql error: You have an error in your SQL syntax near '=1,pmpopup,'') WHERE userid=12221' at line 1

mysql error number: 1064

Date: Monday 26th of January 2004 03:46:55 PM
Script: http://www.alleria.com/forums/forums/admin/user.php
Referer: http://www.alleria.com/forums/admin/user.php?action=edit&userid=12221

assassingod
01-26-2004, 08:50 PM
You may have incorrectly installed the hack. Try uploading an unhacked user.php and re-editing the file for the hack.

Xenon
01-26-2004, 08:54 PM
its the part
pmpopup=IF(pmpopup=2 AND =1,pmpopup,'')

which is the problem

Kaelon
01-27-2004, 09:51 PM
Thanks. I hadn't modified user.php as a result of the hack, however, I had added a subroutine into global.php, which when it queried the user account, rendered it uneditable via the Admin CP. Very shoddy work -- I had no idea what the query was originally intended to do, but I removed the hack, and I think someone should move it to Beta Hacks, rather than keep it afloat in Full Releases. It's a shame, because you won't really notice the corruption until the Warnings System starts banning your users.