note 64102 added to function.ibase-field-info

From: Date: Fri, 07 Apr 2006 11:40:53 +0000
Subject: note 64102 added to function.ibase-field-info
Groups: php.notes 
Request: Send a blank email to php-notes+get-107512@lists.php.net to get a copy of this message
Example: $db = ibase_connect($host,$username,$password, "None", 0, 3 ) or die ('Error trying connect to Database!'); $select = "SELECT * from TABLE"; $sql = ibase_query($db,$select) or die($select); $total_fields= ibase_num_fields($sql); for ($j = 1; $j <= $total_fields; $j++) { $info_field = ibase_field_info($sql, $j-1 ); print("Name: " . $info_campo[1]); // print the field name print("Type:". $info_campo[4]); //print the field type print("Size: " . $info_campo[3]); // print the field size } This function does not return the type from the fields as we are accustomed in interbase. Example: Fields VARCHAR are returns as VARYING. Fields of the type CHAR return TEXT. Tested in Firebird 1.5 Super Server. ---- Server IP: 217.24.152.9 Probable Submitter: 200.138.132.46 (proxied: 10.0.0.139) ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.ibase-field-info.php Edit -- http://master.php.net/note/edit/64102 Del: integrated -- http://master.php.net/note/delete/64102/integrated Del: useless -- http://master.php.net/note/delete/64102/useless Del: bad code -- http://master.php.net/note/delete/64102/bad+code Del: spam -- http://master.php.net/note/delete/64102/spam Del: non-english -- http://master.php.net/note/delete/64102/non-english Del: in docs -- http://master.php.net/note/delete/64102/in+docs Del: other reasons-- http://master.php.net/note/delete/64102 Reject -- http://master.php.net/note/reject/64102 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107512) next »