I’m trying to execute a RAW query (using DB::select(DB::raw(..))) in Laravel, but it returns
SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect time value.
FYI, columns are TIMESTAMP data type in MySQL db.
That same query, executed in MySQL Workbench works fine.
I’m assuming some default settings for Laravel-MySQL communication could be to blame, but I may be wrong.
Thanks in advance!
Tried Google-ing the issue, couldn’t find much on the matter, except to change the config/database.php >> mysql >> strict mode to False, since default is True.
I wouldn’t want to change config files unless absolutely necessary.
Which brings me to, what exactly does the MySQL Strict Mode refer to?