Author Topic: A-book v4beta SQL error 1366 incorrect integer value ''  (Read 17 times)

Offline richardh9935

  • Coccinella
  • *
  • Posts: 15
  • Karma: +0/-0
A-book v4beta SQL error 1366 incorrect integer value ''
« on: 11 January 2022, 23:40:38 »
I am importing the file I exported from J3 to get the Books data from J3 to J4. (All other tables worked fine.) I confirmed that the file contains the correct integer value (without quotes) for USERID, but I keep getting the SQL error 1366. I am using the beta version 4 of A-book.

This issue may not affect users who stayed with v4.* of Mysql or MariaDB. I've moved up a version at the same time.

I found a request for help on StackOverFlow that looks as though it matches our situation.
https://stackoverflow.com/questions/41473485/cant-get-rid-of-error-number-1366-incorrect-integer-value
New versions of MariaDB and Mysql are less tolerant of the NULL value.

This suggests that either:
  • IMPORT form does not return the integer value of the USERID, but instead returns NULL.
  • IMPORT form puts NULL in the file instead of the existing value
  • BOOK table definition for USERID does not allow NULL values.

The StackOverFlow recommendation is to change the BOOK table definition to allow NULL values for INTEGER columns.

Vox Populi(x) forum

A-book v4beta SQL error 1366 incorrect integer value ''
« on: 11 January 2022, 23:40:38 »

Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 1.080
  • Karma: +2/-0
Re: A-book v4beta SQL error 1366 incorrect integer value ''
« Reply #1 on: 12 January 2022, 14:58:18 »
Hi richardh9935,
the import-export tool is intendend for operation in the same version of Abook. The export-import fron abook J3 to abook j4 is not supported because some fields may be different.
If you want to upgrade a joomla web site to J4 follow these steps:
- upgrade jommla from j3 to j4
- install abook 4 without unistall abook 3

In this way the installation process is able to modify INTEGER field values from NULL to zero. The affected fields are "year", "user_id", "userid", "user_id", "pag_index". See administrator/components/com_abook/sql/updates/mysql/4.0.0.sql and 3.1.6.sql for get the queries if you needs
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
http://www.antivirushelp.it
stacca la spina!

Vox Populi(x) forum

Re: A-book v4beta SQL error 1366 incorrect integer value ''
« Reply #1 on: 12 January 2022, 14:58:18 »

Offline richardh9935

  • Coccinella
  • *
  • Posts: 15
  • Karma: +0/-0
Re: A-book v4beta SQL error 1366 incorrect integer value ''
« Reply #2 on: 13 January 2022, 04:10:22 »
Thank you.