OGSteam / mod-attaques

Permet de visualiser les gains que vous avez réalisé lors de vos différents raids
0 stars 2 forks source link

SQL error while inserting in archives #11

Open davidterranova opened 4 years ago

davidterranova commented 4 years ago

Hi, I face an SQL error while mod attaques is inserting data in archives.

INSERT INTO ogspy_attaques_archives ( `archives_id` , `archives_user_id` , `archives_nb_attaques` , `archives_date` , `archives_metal` , `archives_cristal` , `archives_deut` , `archives_pertes`, `archives_recy_metal`, `archives_recy_cristal` ) VALUES ( NULL , '1', '25', '1572562800', '19284524', '8940102', '3151360' , '0', '', '' )

with the following error :

Incorrect integer value: '' for column `ogspy`.`ogspy_attaques_archives`.`archives_recy_metal` at row 1

I suspect bad default values for the tables and incorrect 0 values in the query.

Inserting manually the data from mariaDB console with 0 values instead of '' does not solve the problem.

Here is the full error from administration

[0] => /app/mod/attaques/index.php
fonction => require_once
ligne => 69
file => /app/index.php
[3]
[0] => /app/mod/attaques/attaques.php
fonction => include
ligne => 99
file => /app/mod/attaques/index.php
[2]
)
NULL , '1', '25', '1572562800', '19284524', '8940102', '3151360' , '0', '', ''
VALUES (
[0] => INSERT INTO ogspy_attaques_archives ( `archives_id` , `archives_user_id` , `archives_nb_attaques` , `archives_date` , `archives_metal` , `archives_cristal` , `archives_deut` , `archives_pertes`, `archives_recy_metal`, `archives_recy_cristal` )
fonction => sql_query
ligne => 68
file => /app/mod/attaques/attaques.php
[1]
)
NULL , '1', '25', '1572562800', '19284524', '8940102', '3151360' , '0', '', ''
VALUES (
[0] => INSERT INTO ogspy_attaques_archives ( `archives_id` , `archives_user_id` , `archives_nb_attaques` , `archives_date` , `archives_metal` , `archives_cristal` , `archives_deut` , `archives_pertes`, `archives_recy_metal`, `archives_recy_cristal` )
fonction => DieSQLError
ligne => 138
file => /app/includes/mysql.php
[0]
) - Erreur n°1366 Incorrect integer value: '' for column `ogspy`.`ogspy_attaques_archives`.`archives_recy_metal` at row 1
NULL , '1', '25', '1572562800', '19284524', '8940102', '3151360' , '0', '', ''
VALUES (
02/12/2019 09:20:40 : Erreur critique mysql - Req : INSERT INTO ogspy_attaques_archives ( `archives_id` , `archives_user_id` , `archives_nb_attaques` , `archives_date` , `archives_metal` , `archives_cristal` , `archives_deut` , `archives_pertes`, `archives_recy_metal`, `archives_recy_cristal` )
darknoon29 commented 4 years ago

Thanks for the detailed report. I will have a look. 😉