|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-01-12 15:24 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
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 Blobgeorg@php.net you are WRONG!!!!! for ($i=0;$i<$numcampos;$i++){ $cab=mysql_field_name($result,$i); // I use a right function echo "Field $i: $cab"; } I work with mysql 4.0