MySQL returns an error when concatenating strings and Num types. mysqlnum
Problems Found
The image address is as follows:
Http://qximg.lightplan.cc/2016/09/11/1473574486942944.jpeg
The effect to be achieved is to add the size, as shown in the following figure.
Http://qximg.lightplan.cc/2016/09/11/1473574486942944.jpeg | 1200*675
Take it for granted at first
UPDATE tag_group SET cover = cover + '| 1200*675 'where id = 1;
Result Error
Data truncation: Truncated incorrect DOUBLE value: 'http: // qximg. lightplan. cc/2016/09/11/1473574486942944 .jpeg'
It indicates that an incorrect value is intercepted.
Solution
We recommend that you use String concatenation when querying information.Concat
Function concatenation
UPDATE tag_group SET cover = concat (cover, '| 1200*675') WHERE id = 1;
Summary
The above is all the content of this article. We have learned that the solution to this problem is very simple. I hope the content of this article will help you in your study or work, if you have any questions, you can leave a message.