MyBB Community Forums

Full Version: Mysql error in Inline Ads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have had problems on having activated the plugin "Inline Ads". On having wanted to activate it the following mistake error:
Quote: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')

The server use mysql 5 and php 4. I would like to be able solve it like

Thank you for your support. Big Grin

PD: I´m sorry my bad english Sad
Moved to Code Mods.

Please be sure and read any and all stickies before posting, the MyBB Group does not provide support for third party scripts.
Try changing the line in the plugin where it says 'NULL' to just ''.

This is my mod and if you want support you can hit my forums for it (in my sig).
You need to supply a INT. not a empty string. '' is empty string. 'NULL' is NULL. 0 is a integer. Although, as gid is auto auto_incremented it shouldn't be in the query at all.
Thank you for your answers Wink, I have eliminated the variable $gid and $sid and the error has disappeared. The plugin works 100 %. Was some function affecting escencial the erased the variable $gid and $sid?

No it should be fine...GID is auto_incremented as Crakter said.
Ok, thank you Big Grin. It is to say that the variable $gid shouldn't be in the query at all.