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.