MyBB Community Forums

Full Version: wont let me install mods
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
every time i try and install a mod it comes up with

MySQL error: 1366
Incorrect integer value: 'NULL' for column 'gid' at row 1
Query: INSERT INTO mybb_settinggroups (gid, name, title, description, disporder, isdefault) VALUES ('NULL', 'Inline Ads', 'Inline Ads', 'Setup your inline ads for your forums.', '20', 'no')

and its for any mod can anyone help!!
You will need to contact the author of the modification - they're using incorrect queries for inserting content.



To plugin authors:

You do not need to specify the auto incremental column in the insert query. So for example if you're using our own insert_query method, for the above query you would use:
$new_group = array(
  'name' => 'Inline Ads',
  'title' => 'Inline Ads',
  'description' => 'Setup your inline ads for your forums.',
  'disporder' => '20',
  'isdefault' => 'no'
);
$db->insert_query(TABLE_PREFIX."settinggroups", $new_group);