#19385 [Opn->Bgs]: mysql_field_type

From: Date: Fri, 13 Sep 2002 09:31:02 +0000
Subject: #19385 [Opn->Bgs]: mysql_field_type
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19294@lists.php.net to get a copy of this message
ID: 19385 Updated by: georg@php.net Reported By: vlada@activemedia.co.yu -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: mysql_field_type returns if there is an equivalent datatype, the php datatype, otherwise the MySQL data type. Note that there is no diffrence between blob and text in MYSQL_FIELD structure. To get the exact mysql datatypes from a table use mysql_query ("describe table"). Previous Comments: ------------------------------------------------------------------------ [2002-09-13 02:32:36] vlada@activemedia.co.yu I'm using MySQL V3.23.51-nt. When used "mysql_field_type" function I found wrong reported types -- or differentone than with "SHOW FIELDS FROM". Here are only some examples: ------------------------------------------------------ mysql_field_type | SHOW FIELDS FROM ------------------------------------------------------ string | varchar(150) ------------------------------------------------------ blob | text ------------------------------------------------------ int | int(11) ------------------------------------------------------ int | tinyint(4) ------------------------------------------------------ real | float ------------------------------------------------------ year | year(4) ------------------------------------------------------ I hope it would help you to find out where is a problem. It seems that mysql_field_type has poor description of the filed types and many similar types it reports the same ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19385&edit=1

« previous php.bugs (#19294) next »