mercredi 18 janvier 2017

Laravel Incorrect date value sql_mode empty

I have a problem executing a sql update/insert using Laravel's Query Builder (DB Facade). When inserting a row into a table I get the QueryException: Invalid datetime format: 1292 Incorrect date value: '0000-00-00' for column 'FoundationDate'.

When I copy the SQL statement to PHPMyAdmin, it works without problems. I know it depends on the sql_mode setting. I checked this variable and there is no strict mode enabled! So how is this possible that it works on PHPMyAdmin but in Laravel it doesn't?

I'm using Mysql 5.5 and Laravel 5.3.

Thanks in advance!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2k3Ded5
via IFTTT

Aucun commentaire:

Enregistrer un commentaire