The solution to the error of concatenation of string and num type in Mysql _mysql

Source: Internet
Author: User

Find problems

The picture address is as follows

Yun_qi_img/1473574486942944.jpg

The effect you need to implement is to add dimensions, such as the following effects

yun_qi_img/1473574486942944.jpg|1200*675

At first take for granted

UPDATE tag_group SET cover = cover + ' |1200*675 ' WHERE id = 1;

Result error

Data truncation:truncated Incorrect DOUBLE value: ' Yun_qi_img/1473574486942944.jpg '

The tip says that an incorrect value has been intercepted.

Solving method

Find out the data string stitching recommended by concat function stitching

UPDATE tag_group SET cover = concat (cover, ' |1200*675 ') WHERE id=1;

Summarize

The above is the entire content of this article, we have learned, in fact, the solution to this problem is very simple, I hope this article content for everyone's study or work can bring some help, if you have questions you can message exchange.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.