MyBB Community Forums

Full Version: topStats plugin - sql error message
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having a problem with installing this plugin 
SQL Error:
1366 - Incorrect integer value: 'NULL' for column `example`.`mybb_settinggroups`.`gid` at row 1
Query:
INSERT INTO mybb_settinggroups (`gid`,`name`,`title`,`description`,`disporder`,`isdefault`) VALUES ('NULL','topStats','Top Stats','Settingsfor plugin Top Stats.',145,'0')

The plugin 
https://community.mybb.com/mods.php?action=view&pid=269
Simply edit the file topStats.settings.php and search for this piece of of code in line 39:
        $settings_group = array(
            'gid' => 'NULL',
            'name' => 'topStats',
            'title' => $db->escape_string($lang->topStats),
            'description' => $db->escape_string($lang->topStats_Desc),
            'disporder' => $max_disporder + 1,
            'isdefault' => '0'
        );
Remove the line 'gid' => 'NULL';
This removal is necessary because this table filed uses an auto-increment integer value that must not be NULL.

[ETS]
(2023-01-19, 01:48 AM)[ExiTuS] Wrote: [ -> ]Simply edit the file topStats.settings.php and search for this piece of of code in line 39:
        $settings_group = array(
            'gid' => 'NULL',
            'name' => 'topStats',
            'title' => $db->escape_string($lang->topStats),
            'description' => $db->escape_string($lang->topStats_Desc),
            'disporder' => $max_disporder + 1,
            'isdefault' => '0'
        );
Remove the line 'gid' => 'NULL';
This removal is necessary because this table filed uses an auto-increment integer value that must not be NULL.

[ETS]
1366 - Incorrect integer value: 'NULL' for column `example`.`mybb_settings`.`sid` at row 1

Query:
INSERT INTO mybb_settings (`sid`,`name`,`title`,`description`,`optionscode`,`value`,`disporder`,`gid`) VALUES ('NULL','topStats_Status_All','Enable plugin.','','onoff','1',1,265)
Remove any line 'sid' => 'NULL',