Truncated incorrect double value

I’m getting this error and the part that is causing me issues is that the incorrect DOUBLE value isn’t in the problem query at all, if the error statement is to be believed.

[ERROR] [MySQL] [gcphone] An error happens on MySQL for query "UPDATE phone_messages SET phone_messages.isRead = 1 WHERE phone_messages.receiver = 21371 AND phone_messages.transmitter = '18701'": ER_TRUNCATED_WRONG_VALUE: Truncated incorrect DOUBLE value: 'police'


CREATE TABLE `phone_messages` (

  `id` int(11) NOT NULL,

  `transmitter` varchar(10) NOT NULL,

  `receiver` varchar(10) NOT NULL,

  `message` varchar(255) NOT NULL DEFAULT '0',

  `time` timestamp NOT NULL DEFAULT current_timestamp(),

  `isRead` int(11) NOT NULL DEFAULT 0,

  `owner` int(11) NOT NULL DEFAULT 0


I’ve googled a lot but haven’t been able to sort this. If anyone could tell me what I am missing, I would greatly appreciate it.

Thanks for your time!

you’re right, that makes no sense at all

since receiver is VARCHAR, try putting quotes around 21371 like you did for transmitter ‘18701’

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.