保留图片指纹(一串乱码)到mysql, 求分析

WBOY
Release: 2016-06-13 11:31:33
Original
1056 people have browsed it

保存图片指纹(一串乱码)到mysql, 求分析

本帖最后由 JJ___JJ 于 2013-08-08 15:10:59 编辑 各位大大, 图片指纹如下:

<br />
Copy after login
<br />sql为:<br />
<br /> update test set `bitmap` ='輀+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; <br />
Copy after login
<br />bitmap字段为varchar 255<br />很奇怪的一件事, 直接php运行sql, 会报错:<br />
<br />$query = "update test set `bitmap` ='".mysql_real_escape_string($bitmap)."' where id = {$picture['id']};";<br />1366: Incorrect string value: '\xDD[+W&+...' for column 'bitmap' at row 1<br />
Copy after login


直接copy这段sql去mysql客户端执行, 是没问题的. 目前认为是copy的时候, 这段指纹乱码没有能copy完整, 或者已经变了,
如果不加mysql_real_escape_string, 而是将指纹乱码保存到文本, 是无法copy出来 只能粘贴处部分. 
求大大们帮忙分析, 非常感谢.
MySQL 乱码
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template