- specify list a column list and omit your auto_incremented column from it as njk suggested. That would be the best approach. See comments.
- explicitly assign NULL
- explicitly assign 0
No value was specified for the AUTO_INCREMENT column, so MySQL assigned sequence numbers automatically. You can also explicitly assign NULL or 0 to the column to generate sequence numbers.
When using mysqli server, you can fix it by typing
**** set global sql_mode=''
Try to edit your my.cf and comment the original sql_mode and add sql_mode = "".
vi /etc/mysql/my.cnf
sql_mode = ""
save and quit...
service mysql restart
0 Comments