mysqli fetch-fields returns blob for text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On http://www.php.net/manual/en/mysqli.constants.php there are some predefined constants for MYSQLI_TYPE_TINY_BLOB, MYSQLI_TYPE_MEDIUM_BLOB, MYSQLI_TYPE_LONG_BLOB, and MYSQLI_TYPE_BLOB.  Through some experimentation I have found that fields in my MySQL database that are declared as 'text' in MySQL are categorized by PHP as 'blob' when I compare the above constants to the field's type using http://www.php.net/manual/en/mysqli-result.fetch-fields.php.

In the MySQL documentation http://dev.mysql.com/doc/refman/5.1/en/blob.html in the second paragraph it states: 
---
BLOB values are treated as binary strings (byte strings). They have no character set, and sorting and comparison are based on the numeric values of the bytes in column values. TEXT values are treated as nonbinary strings (character strings). They have a character set, and values are sorted and compared based on the collation of the character set.
---

I was wondering if PHP's interpretation of 'text' as 'blob' could cause me any trouble down the road and what the workarounds are, if any.  Thank you.

Mari
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux