I'm seeing the same issue when adding new users to the tblusers table that I saw adding new projects to the tbl_project table. The datetime fields don't get added with Null values. This is the error:
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1292 Incorrect datetime value: '' for column 'last_login_time' at row 1. The SQL statement executed was: INSERT INTO `tbl_user` (`username`, `email`, `password`, `last_login_time`, `create_time`, `create_user_id`, `update_time`, `update_user_id`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7)
The default value in the table is set to NULL.
Page 1 of 1
Adding New Users
#2
Posted 08 October 2013 - 10:31 AM
Try to set them to current timestamp, for example in the beforeSave method of your active record.
Don't be a dick.
Share this topic:
Page 1 of 1