Menu

#139 can not add new contacts with empty birthday

v1.0_(example)
closed
nobody
None
5
2012-10-29
2012-10-15
Bauer
No

With respect to version 8.1.15 there is a problem when entering addresses without filling out the date-fileds for birthday/anniversary ($aday, $bday). The empty entry conflicts with the required integer value (tinyint).

Discussion

  • Bauer

    Bauer - 2012-10-18

    The problem results from a more strict mode of operation of MySQL defined at the MySQL ini-file (my.ini)

    [mysqld]
    sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

    If the STRICT_TRANS_TABLES is removed the problem dissapears and new entries can be added without problem.

    The STRICT_TRANS_TABLES is default for MySQL 5.5.28 for Windows (http://dev.mysql.com/downloads/mysql/)

     
  • chatelao

    chatelao - 2012-10-18

    Hi, Thanks for the analysis. I will try to remove the bug.

     
  • chatelao

    chatelao - 2012-10-18

    Setup to enable the mode without .ini

    SET sql_mode = 'STRICT_TRANS_TABLES';

     
  • chatelao

    chatelao - 2012-10-18

    Hi, could you send me a .zip with all your changes or even better, fork on github.com
    https://github.com/chatelao/php-addressbook

     
  • chatelao

    chatelao - 2012-10-29

    How did you get the error messages work?

     
  • chatelao

    chatelao - 2012-10-29

    mysql_query("SET SQL_MODE = 'MYSQL40';");

    in dbconnect.php

     
  • chatelao

    chatelao - 2012-10-29
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel