Code:
For php 4.3 and mysql 4.x the returned values are:
CHAR, VARCHAR, ENUM, SET: string
TINYINT, SMALLINT, MEDIUMINT, INT, INTEGER, BIGINT: int
FLOAT, DOUBLE, DECIMAL, NUMERIC: real
TIMESTAMP: timestamp
YEAR: year
DATE: date
TIME: time
DATETIME: datetime
TINYBLOB, MEDIUMBLOB, LONGBLOB, BLOB, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT: blob
you may get better data with: SHOW FIELDS FROM table.db
or http://dev.mysql.com/doc/refman/5.1/a/describe.html
Also to note " Like mysql_fetch_field, this returns the PHP type, not the MySQL type."
Bookmarks