write down,forget
adidas eqt support ultra primeknit vintage white coming soon adidas eqt support ultra boost primeknit adidas eqt support ultra pk vintage white available now adidas eqt support ultra primeknit vintage white sz adidas eqt support ultra boost primeknit adidas eqt adv support primeknit adidas eqt support ultra boost turbo red white adidas eqt support ultra boost turbo red white adidas eqt support ultra boost turbo red adidas eqt support ultra whiteturbo adidas eqt support ultra boost off white more images adidas eqt support ultra boost white tactile green adidas eqt support ultra boost beige adidas eqt support ultra boost beige adidas eqt support refined camo drop adidas eqt support refined camo drop adidas eqt support refined running whitecamo adidas eqt support 93 primeknit og colorway ba7506 adidas eqt running support 93 adidas eqt support 93
分类 Category : Mysql

php mysql bit类型处理

<Category: Mysql, PHP> Comments Off on php mysql bit类型处理

http://codeigniter.com/forums/viewthread/157028/#758143
http://www.dotcoo.com/post-101.html

php读取mysql列bit(1)列时获得的是一个二进制的数据,不是布尔值不是字符串也不是数字,所以不能正常使用也不能正常显示,可以使用ord函数把二进制数据转换为数字。

ord函数的作用就是将ASCII的字符转换为他们的字面值,对于二进制数字也有效。

ord函数能转换出来的最大的值是255,也就是一个字节,对于bit(8)以上的列不能正常转换。

本文来自: php mysql bit类型处理