Save the image fingerprint (a string of garbled characters) to mysql, find and analyze this post, and then edit it by jj1__jj at 2013-08-0815: 10: 59. & nbsp; the image fingerprint is as follows: SQL: & nbsp; update & nbsp; test & nbsp; s save the image fingerprint (a string of garbled characters) to mysql for analysis
This post was edited by jj1__jj at 15:10:59. The image fingerprints are as follows:
SQL:
Update test set 'bitmap' = 'salary + W & + N {| \ 0Ox0 \ $8) sld \ "Z | y | \ 0ZZ! \ 0] P! Zw \ Z \ Zgm | p \ "y ^ W |) Q, \ 0xc {\ 0 \ Z \ [#] pEXcto [ER '\ 'L {B & 8P8j [w1y ^ t | d0YSMK! [Sj \ 0Kyww7) PE \ ZIPv ^ m | \ 0 \ 0 \ 0 {\ 0PK ^ \ 0y | x-e ^ | jcxc | 'n' where id = 168;
The bitmap field is varchar 255.
A strange thing is that an error is reported when you run SQL directly in php:
$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
It is okay to directly copy the SQL statement to the mysql client. Currently, when we think it is copy, the fingerprint garbled text cannot be copied completely, or it has changed,
If you do not add mysql_real_escape_string, but save the fingerprint garbled characters to the text, you cannot copy it and paste only the part.
Thank you very much for your analysis. I am very grateful for sharing the following MySQL code:
------ Solution --------------------
Saves base64 encoding, saving you trouble
Save directly, the bitmap field must be binary
But it is not guaranteed that the storage will succeed.