Closed bhsmither closed 5 months ago
On this page: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
, near the bottom:
For example, in non-strict SQL mode, inserting the string 'abc' into an integer column results in conversion of the value to 0 and a warning...
Please examine your database at the
CubeCart_inventory. maximum_quantity
column.The default value is an allowed
null
, but the value may actually be a zero. (It is in my database.)When blanking the "Maximum Quantity Purchase" text entry field and Saving the form, the
POST['maximum_quantity']
does have a zero-length-string value. (So doesPOST['live_from']
.)The database has INT as the data type for this column. When issuing an UPDATE query, the database issues:
I believe that the database engine then refuses to actually update those fields with the default value, and instead uses the equivalent integer value (being zero).
(I wonder if there is a database setting for this.)