I have an array with about 400 records to insert into a database table
I have tried inserting with the DataHandler and I faced the issues below:
- After inserting 195 records, it gives the "Truncated incorrect DOUBLE value" error. When try creating new record in the list module, it still gives the error above.
- If I limit the records to insert to a maximum of 194, records are inserted with no errors and I can also create records in the list module but the records are duplicated in the database.
For another approach, I used the QueryBuilder's insert() to directly insert the data into the database table.
- All the data was inserted as I wanted but when I try to create a new record in the List module, I get the "Truncated incorrect DOUBLE value" again.
- But if I limit to 194 no error occurs in the List module when creating a new record.
I will be very glad on help with this problem.
I found something regarding that error and MySQL, e.g. MYSQL Truncated incorrect DOUBLE value
It seems to come from obscure syntax and other quite unrelated MySQL parser errors.
I would try changing values from int to string in your DataHandler-array.
To help you one would need the relevant Datahandler-code with the array-record that is failing and the column definition (
DESCRIBE tablename) for the table in question. Also the database version would be interesting.