Home > Backend Development > PHP Tutorial > phpMyAdmin中的数据表是否可存入十六进制数

phpMyAdmin中的数据表是否可存入十六进制数

WBOY
Release: 2016-06-23 14:02:54
Original
1014 people have browsed it

选择怎样的数据类型?


回复讨论(解决方案)

请搜mysql的hex()和unhex()函数

请搜mysql的hex()和unhex()函数
我实验了一下,在数据库中创建了一盒名为aaa的数据表,里边的两个字段定义为varchar类型,分别插入0x13和0x04,然后在php中读取这两个数后相加,我认为要是作为字符相加的话,结果肯定不是23。我运行后得到的是23。也就说明,只要数据类型设置成varchar,插入的数据带有0x,就会作为十六进制数来处理。

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