I have just moved a php site to a new server. One of my queries is failing with Data truncated for column 'xxx' ar row 1
message. I checked that this field is float (10,6) type. And the values I provided white updating are not of exactly float(10,6) format and they vary .. like sometimes I put 0 only, or 54.56666 only .. so any idea how do I sort it out??
PS: On the earlier server, everything was working ok. This new server has different (newer) version of mysql. I don't want to make any changes to the mysql config.
Also, if you have an enum and you insert a value not present in the enum you can see this error.
You tried to put in data that was longer than what your column definitions allow. Please provide the queries you used for us to see. In addition googling the error message yielded:
The suggested solution there is to modify the server's "strict mode" setting:
When this manual refers to “strict mode,” it means a mode where at least one of
STRICT_TRANS_TABLES
orSTRICT_ALL_TABLES
is enabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With