#31518 [Fbk->Opn]: The mysql_field_type, WRONG

From: Date: Thu, 13 Jan 2005 15:27:04 +0000
Subject: #31518 [Fbk->Opn]: The mysql_field_type, WRONG
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72065@lists.php.net to get a copy of this message
ID: 31518 User updated by: mulder_bravo at yahoo dot com Reported By: mulder_bravo at yahoo dot com -Status: Feedback +Status: Open Bug Type: MySQL related Operating System: Windows Xp - Service Pack1 PHP Version: 4.3.10 New Comment: Ok.. I have this field on the database CREATE TABLE opiv1 ( idopinion INTEGER(10) UNSIGNED NOT NULL, comntario LONGTEXT NULL, PRIMARY KEY(idopinion) ); when I apply a select function, I need the field name... I use mysql_field_type on the data collect. $numcampos=mysql_num_fields($result); for ($i=0;$i<$numcampos;$i++){ $cab=mysql_field_name($result,$i); echo "Field $i: $cab"; } he most to write: Field Int Field LongText and this show me Field Int Field Blob Previous Comments: ------------------------------------------------------------------------ [2005-01-12 22:05:00] jed@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. We need a little more of your reproduce script. ------------------------------------------------------------------------ [2005-01-12 15:24:31] mulder_bravo at yahoo dot com Description: ------------ When i get a data type, this dont show me the rigth value. I have a LongText field, when I use mysql_field_type, this show me blob... why?? Reproduce code: --------------- $ty=mysql_field_type($result,$i); echo $ty; Expected result: ---------------- I expected the right field name, LongText field... Actual result: -------------- blob ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31518&edit=1

« previous php.bugs (#72065) next »