MyBB Community Forums

Full Version: SQL Error:1366 - Incorrect integer value
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1366 - Incorrect integer value: '' for column 'canmanagecomments' at row 1
Query:
UPDATE mybb_usergroups SET `type`='1', `title`='Registered', `description`='After registration, all users are placed in this group by default.', `namestyle`='{username}', `usertitle`='', `stars`='0', `starimage`='images/star.gif', `image`='http://files.subglobal.net/pictures/SubGlobal/SGAvitar.png', `isbannedgroup`='0', `canview`='1', `canviewthreads`='1', `canviewprofiles`='1', `candlattachments`='1', `canpostthreads`='1', `canpostreplys`='1', `canpostattachments`='1', `canratethreads`='1', `caneditposts`='1', `candeleteposts`='0', `candeletethreads`='0', `caneditattachments`='1', `canpostpolls`='1', `canvotepolls`='1', `canundovotes`='0', `canusepms`='1', `cansendpms`='1', `cantrackpms`='1', `candenypmreceipts`='1', `pmquota`='200', `maxpmrecipients`='5', `cansendemail`='1', `cansendemailoverride`='0', `maxemails`='5', `canviewmemberlist`='1', `canviewcalendar`='1', `canaddevents`='1', `canbypasseventmod`='0', `canmoderateevents`='0', `canviewonline`='1', `canviewwolinvis`='0', `canviewonlineips`='0', `cancp`='0', `issupermod`='0', `cansearch`='1', `canusercp`='1', `canuploadavatars`='1', `canchangename`='0', `showforumteam`='0', `usereputationsystem`='1', `cangivereputations`='1', `reputationpower`='1', `maxreputationsday`='5', `maxreputationsperuser`='0', `maxreputationsperthread`='0', `attachquota`='0', `cancustomtitle`='1', `canwarnusers`='0', `canreceivewarnings`='1', `maxwarningsday`='0', `canmodcp`='0', `showinbirthdaylist`='1', `canoverridepm`='0', `canusesig`='1', `canusesigxposts`='0', `signofollow`='0', `canmanagecomments`='', `cansendcomments`='1', `caneditselfcomments`='1', `candeleteselfcomments`='' WHERE gid='2'



I've tried talking to the SQL with this:
ALTER TABLE mybb_usergroups MODIFY COLUMN canmanagecomments tinyint(1) NOT NULL default '0'
But the error still continues.
Any ideas?
UPDATE databasename.mybb_usergroups SET canmanagecomments = '0' WHERE mybb_usergroups.gid = 1;

Also are you using a plugin which adds the canmanagecomments because I don't have this on a default version of mybb.
You could just change it to null rather than not null. Or turn your MySQL off strict mode.
I'm using MySQL Workbench. I don't know anything about "strict mode" can you tell me about it?

I used the query 

UPDATE mydbname.mybb_usergroups SET canmanagecomments = '0' WHERE mybb_usergroups.gid = 1;


still have this error  =\

im using mybb 1.6 something by the way, i plan on updating in a few months

Alright thanks guys, I was able to solve the problem by disabling the very old plugin that manages comments.
@RZeroX Smile
(2016-03-20, 11:39 PM)nth Wrote: [ -> ]You could just change it to null rather than not null. Or turn your MySQL off strict mode.

Sometimes the error is different:

Quote:MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.
SQL Error:1366 - Incorrect integer value: 'NULL' for column 'gid' at row 1Query:INSERT INTO hf_settinggroups (gid,name,title,description,disporder,isdefault) VALUES ('NULL','fastQuote','Fast Quote','Settings for plugin \"Fast Quote\"',108,'0')


In this case this plugin try to assign 'NULL' (as string) to an integer field

My point: there are too many possible fails Sad
The issue here is badly written plugins, there's not a lot we can really do about it.
(2016-12-11, 01:13 PM)Matt Wrote: [ -> ]The issue here is badly written plugins, there's not a lot we can really do about it.

how to fix it plugin profile comment?