MyBB Community Forums

Full Version: SQL Error: 1364 - Field 'views' doesn't have a default value
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
When users go to register their account on our my bb form they are getting the error! Please Help!

SQL Error:
1364 - Field 'views' doesn't have a default value
Query:
INSERT INTO mybb_users (username,password,salt,loginkey,email,postnum,avatar,avatartype,usergroup,additionalgroups,displaygroup,usertitle,regdate,lastactive,lastvisit,website,icq,aim,yahoo,msn,birthday,signature,allownotices,hideemail,subscriptionmethod,receivepms,receivefrombuddy,pmnotice,pmnotify,showsigs,showavatars,showquickreply,showredirect,tpp,ppp,invisible,style,timezone,dstcorrection,threadmode,daysprune,dateformat,timeformat,regip,longregip,language,showcodebuttons,away,awaydate,returndate,awayreason,notepad,referrer,referrals,buddylist,ignorelist,pmfolders,warningpoints,moderateposts,moderationtime,suspendposting,suspensiontime,coppauser,classicpostbit,usernotes) VALUES ('Nigger1','3262ccf95797d5ecda3e872738079872','BYDaZYFh','jVBrBVfPU18yaOboCwIRlLURkfUQyJZNfQnYhokzLG6EgUmhSa','[email protected]','0','','','2','','0','','14021
Please provide a forum url
(2014-06-07, 09:35 AM)Leefish Wrote: [ -> ]Please provide a forum url
sorry! Its
http://coloredhacksforums.likesyou.org/
Are you using some sort of avatar plugin? Does it happen with plugins disabled?
Try running this query in PHPMyAdmin

ALTER TABLE mybb_users ALTER COLUMN views INT DEFAULT 0

This should give the column views a default value of 0.
(2014-06-07, 01:21 PM)dragonexpert Wrote: [ -> ]Try running this query in PHPMyAdmin

ALTER TABLE mybb_users ALTER COLUMN views INT DEFAULT 0

This should give the column views a default value of 0.

I get a error when i put it into phpMyAdmin

#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 'INT DEFAULT 0' at line 1
What are your MySQL and php version numbers?
(2014-06-07, 10:13 PM)Leefish Wrote: [ -> ]What are your MySQL and php version numbers?

SQL is 5.6.13 and php is 5.3.24
The MySQL might be the problem - I will ask a dev to check this thread.
(2014-06-08, 01:25 AM)Leefish Wrote: [ -> ]The MySQL might be the problem - I will ask a dev to check this thread.

Okay
Pages: 1 2