shaidiren shaidiren - 2 months ago 14
MySQL Question

Why is there an error in mysql query?Error : Truncated incorrect DOUBLE value: '114.243.134.208'

It reported an error when i query in mysql, the sql is below:

update bsk.bskchapterlist set stateid=6 where username=11111111111 and lessonid=987;


The error was:

Error : Truncated incorrect DOUBLE value: '114.243.134.208'


But where was the value '114.243.134.208' came from?

How to resolve this problems, please help me.

Answer

Please check datatype of your DB table. If any of the field is with datatype varchar then please wrap it with quote. Let's say username field is with datatype varchar then please use following query. I assumed that stateid and lessonid fields have int datatype and if any of those having datatype varchar please wrap with quotes those as well.

update bsk.bskchapterlist set stateid=6 where username='11111111111' and lessonid=987;
Comments