MyBB Hacks

Full Version: MySQL error: 1064
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I tried recalculating the users money, and I got this error:

Code:
MySQL error: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Shop,Games Consoles,Apple Store,avatar,avatardimensions,avatartype,usergroup,add' at line 1
Query: REPLACE INTO mybb_users(uid,username,password,salt,loginkey,email,postnum,Celebrity Shop,Games Consoles,Apple Store,avatar,avatardimensions,avatartype,usergroup,additionalgroups,displaygroup,usertitle,regdate,lastactive,lastvisit,lastpost,website,icq,aim,yahoo,msn,birthday,signature,allownotices,hideemail,emailnotify,invisible,receivepms,pmpopup,pmnotify,remember,threadmode,showsigs,showavatars,showquickreply,showredirect,ppp,tpp,daysprune,dateformat,timeformat,timezone,dst,buddylist,ignorelist,style,away,awaydate,returndate,awayreason,pmfolders,notepad,referrer,reputation,regip,language,timeonline,showcodebuttons,totalpms,newpms,unreadpms,mybank,mybanktime,mybankcheck,Games Console,money,purchases,inventory,bankmoneyoffset,bankbasetime) VALUES 


Followed by every member and other info such as avatar URL etc.

Example:

Code:
('1','USERNAME','2ccdd3b9e86b53f45982e1ac23670cd0','GDtKS9Kx','UO5lenYZNjXTo1XwRoRMzjPBMEMbeXYzHWFmFahtjAIx3Bpoqc','EMAIL ADDRESS','1512','','','','AVATAR','100|100','remote','4','','0','Owner','1197314241','1211564775','1211563272','1211561557','','0','','','','','[align=center][IMG]SIGNATURE[/IMG][/align]','yes','no','no','no','yes','yes','new','yes','linear','yes','yes','yes','yes','0','0','0','0','0','0','yes','','','6','no','0','0','','1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can','','0','16','82.5.128.21','','1318733','1','305','0','0','795000','0','no','','30046.2','2','','843167.0000000000','1211500800')


Is there a way to fix this?

Thanks Smile

It looks like you have a very odd modification to your board.
I cannot guarantee that this won't prevent any further errors, as MyBB (1.2.x) itself was never designed to handle field names with spaces, but you can try this:
In inc/myplaza/myplaza_general.php
Find:

Code:
('.implode(',', $fields).')

Replace with:

Code:
(`'.implode('`,`', $fields).'`)


See if that works.



Just out of interest - which modification adds the "Celebrity Shop,Games Consoles,Apple Store" fields to your users table?

it was myps points system, but I have since removed it, thanks, I will try this and tell you how I get along Smile

EDIT: Thanks it works now!
Reference URL's