Keep picture fingerprints (a bunch of garbled characters) to MySQL, ask for analysis

Source: Internet
Author: User
Tags mysql client
Save Picture Fingerprint (a string of garbled characters) to MySQL, seek analysis
This post was last edited by jj___jj on 2013-08-08 15:10:59

Everybody big, picture fingerprint is as follows:



SQL is:



Bitmap field varchar 255
Very strange thing, directly PHP running SQL, will be error:

$query = "Update test set ' bitmap ' = '". Mysql_real_escape_string ($bitmap). "' Where id = {$picture [' id ']};";
1366:incorrect string value: ' \xdd[+w&+ ... ' for column ' bitmap ' at row 1


Direct copy of this SQL to the MySQL client execution, is no problem. At present, it is copy of the time, this piece of fingerprint garbled can not copy complete, or has changed,
If you do not add mysql_real_escape_string, but to save the fingerprint garbled to the text, it is not possible to copy the only part of the paste.
Ask the big help analysis, thank you very much. MySQL garbled

Share to:


------Solution--------------------
Save Base64 code to avoid all worries

is saved directly, the bitmap field must be binary
But there is no guarantee that it will be stored successfully
  • Related Article

    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.