2

I have Prestashop 1.6 and I am unable to add new employee because of this error

... employee (Incorrect date value: '0000-00-00' for column 'stats_compare_from' at row 1)

version is 1.6.0.9 on php 5.3 apache 2.2 and mysql 5.7 deployed on jelastic cloudlets

tried to google for solution but there is no such error

thanks for help

Paweł Madej
  • 1,229
  • 23
  • 42

2 Answers2

2

This error is usually related to MySQL strict mode.

You can see how you can set TRADITIONAL mode here: MySQL: Setting sql_mode permanently

Community
  • 1
  • 1
PrestaShopDeveloper
  • 3,110
  • 3
  • 21
  • 30
0

On my Ubuntu 16.04 i did this:

  1. Open mysql config like so sudo vim /etc/mysql/my.cnf
  2. Created [mysql] block and added the configuration like so (its possible that you already have mysql block, in that case just add line starting with "sql_mode=.."):

[mysqld] sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

  1. Save file :wq
  2. Restart mysql serever: sudo service mysql restart
Matiss
  • 5,079
  • 2
  • 27
  • 27