Truncated incorrect DOUBLE value

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
abonada
New php-forum User
New php-forum User
Posts: 4
Joined: Tue Mar 20, 2018 10:15 pm

Tue Mar 20, 2018 10:19 pm

Hello

Anyone know how to solve this error :

Truncated incorrect DOUBLE value: ''
Query : update ads_ips set visits=visits+1, ip='31.203.44.49' where ad_id = ''

The webpage is: http://2011.familyinnovationconference.com/

Thank you

chorn
php-forum Fan User
php-forum Fan User
Posts: 505
Joined: Fri Apr 01, 2016 2:18 am

Tue Mar 20, 2018 11:51 pm

Try to reproduce this with an SQLite in-memory database. Post it. And post your able structure.

User avatar
phpRob
New php-forum User
New php-forum User
Posts: 65
Joined: Mon Feb 26, 2018 7:15 am

Wed Mar 21, 2018 4:22 am

I've seen errors like this. Check out this link related to the error:
https://bugs.mysql.com/bug.php?id=63112

But before that you can also consider the following...
It could be possible that column ad_id is not a string column but a numeric column; looks like it has been (via a bug) resolved to an empty string when preparing the sql. "ad_id" definitely needs to be correctly getting an actual value. And it would have been helpful to know the structure of your table (the data types of your columns).

abonada
New php-forum User
New php-forum User
Posts: 4
Joined: Tue Mar 20, 2018 10:15 pm

Wed Mar 21, 2018 8:51 pm

Hello

Thanks all for the replies

The issue is solved by disable strict mode from the database using set global sql_mode='';

Thank you

Post Reply