General error: 1366 Incorrect integer value with Doctrine 2.1 and Zend Form update

后端 未结 1 763
小蘑菇
小蘑菇 2020-12-16 17:16

I am processing a submitted Zend Form which updates a Doctrine Record using the following code, where $query is a query built using a doctrine query builder:



        
1条回答
  •  囚心锁ツ
    2020-12-16 17:26

    are you using MySQL? this can happen because MySQL is running in strict mode. run these queries from phpMyAdmin or whatever db administrator you are using to check if the database is in strict mode:

    SELECT @@GLOBAL.sql_mode;
    SELECT @@SESSION.sql_mode;
    

    if it returns something containing STRICT_TRANS_TABLES you could try and run:

    SET @@global.sql_mode= 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
    

    0 讨论(0)
提交回复
热议问题