Fork me on GitHub
Current release is 2.1.6 (21 Nov 2014).

Users who have not yet upgraded to 2.1 should get security release (1 Nov 2014). We will stop providing these security releases to 2.0 at the end of this year.

Vanilla Doesn't Work Well in MySQL Strict Mode

edited December 2011 in Feedback
PHP Version 5.2.17, MySQL server 5.5.15, SQL mode set to strict:

On "Manage Users" dashboard page when I modify some user with "Banned" checkbox unchecked, I get the message:
Incorrect integer value: '' for column 'Banned' at row 1|Gdn_Database|
Query|update GDN_User User set
Email = :Email, Name = :Name, ShowEmail = :ShowEmail,
DateUpdated = :DateUpdated, UpdateIPAddress = :UpdateIPAddress,
Banned = :Banned where UserID = :UserID

which obviously means that value bound to :Banned parameter is empty instead of integer, as expected by MySQL in strict mode. When saving user with "Banned" checkbox checked, update works fine (because checkbox value = 1).

Strict mode can be checked out either by adding to my.ini, section [mysqld] the setting:
or by issuing the query after connecting to the database:


Sign In or Register to comment.