Author Topic: [Quick Fix] General error: 1364 Field 'update' doesn't have a default value IN  (Read 4625 times)

0 Members and 1 Guest are viewing this topic.

Offline khairilgunawan

  • 32
  • 0
  • Active Participant
  • **
    • Skype - khairilgunawan
    • Indoworx
If you get this message after login to your admin page.

Quote
Uh oh! Something went wrong ...
Exception: SQLSTATE[HY000]: General error: 1364 Field 'update' doesn't have a default value IN /home/####/public_html/billing/hbf/components/authorization/class.adminauthorization.php(486), stack trace:
#0 /home/####/public_html/billing/hbf/components/authorization/class.adminauthorization.php(486): PDOStatement->execute()
#1 /home/####/public_html/billing/hbf/components/authorization/class.adminauthorization.php(161): AdminAuthorization->do_login()
#2 /home/####/public_html/billing/hbf/core/types/class.admin_frontcontroller.php(71): AdminAuthorization->check_status()
#3 /home/####/public_html/billing/hbf/core/class.frontcontroller.php(144): Admin_FrontController->dispatch()
#4 /home/####/public_html/billing/hbf/core/class.frontcontroller.php(124): FrontController->handleRequest()
#5 /home/####/public_html/billing/admin/index.php(24): FrontController::init()
#6 {main}
Uh oh! Something went wrong ...
PHP [Error]: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'id' at row 1' in /home/####/public_html/billing/hbf/components/hbdebug/class.hberrorlog.php:31
Stack trace:
#0 /home/####/public_html/billing/hbf/components/hbdebug/class.hberrorlog.php(31): PDOStatement->execute()
#1 /home/####/public_html/billing/hbf/core/class.hbexception.php(82): HBErrorLog->createEntry()
#2 [internal function]: HBException::php_exception_handler(Object(PDOException))
#3 {main}
thrown IN hbf/components/hbdebug/class.hberrorlog.php(31)

Simply to fix that, run SQL Query
Code: [Select]
SET GLOBAL sql_mode=''
MySQL is most likely in STRICT mode. Try running SET GLOBAL sql_mode='' or edit your my.cnf to make sure you aren't setting STRICT_ALL_TABLES or the like.