Announcement

#1 2019-02-09 15:11:40

Fazli
Member
2017-04-26
54

Warning: [mysql error 1364] Field 'id' doesn't have a default value

Hello,
I deleted the sql file on phpmaydmin and I reinstalled the database backed up before, but it produces the error below the picures or albumes as
Warning:  [mysql error 1364] Field 'id' doesn't have a default value

INSERT INTO pg_history
  (
    date,
    time,
    user_id,
    IP,
    section,
    category_id,
    image_id,
    image_type,
    format_id,
    auth_key_id,
    tag_ids
  )
  VALUES
  (
    CURRENT_DATE,
    CURRENT_TIME,
    2,
    '85.106.113.212',
    'categories',
    11,
    44904,
    'picture',
    NULL,
    NULL,
    NULL
  )
; in /home/medyastok.com/include/dblayer/functions_mysqli.inc.php on line 845

I need your help.




Piwigo version: the latest
PHP version: 7.x
MySQL version:
Piwigo URL: http://www.medyastok.com

Offline

 

#2 2019-02-12 14:34:41

Fazli
Member
2017-04-26
54

Re: Warning: [mysql error 1364] Field 'id' doesn't have a default value

I have been trying to overcome, and I made a bit progress. Now it occurs when you logout the site, I mean when you are guest, when you are log out. When you log in it works properly.

Offline

 

#3 2019-02-13 19:40:08

Humblewizard
Member
2019-02-09
8

Re: Warning: [mysql error 1364] Field 'id' doesn't have a default value

Recent updates to the mySQL server has made it less tolerant to incomplete queries where fields don't have default values. In the configuration for the server you can have it degrade back to the more tolerant mode. Or change the query to:

INSERT INTO pg_history
  (
    id,
    date,
    time,
    user_id,
    IP,
etc etc *****

  )
  VALUES
  (
    NULL,
    CURRENT_DATE,
    CURRENT_TIME,
    2,

Offline

 

#4 2019-02-14 10:46:36

Fazli
Member
2017-04-26
54

Re: Warning: [mysql error 1364] Field 'id' doesn't have a default value

Thanks Humblewizard,
I succeeded in solving the problem via by phpmyadmin, by setting the "id" as key and auto_increment.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact