ibase_num_fields

ibase_num_fields -- Get the number of rows in a result set

Description

int ibase_num_fields(int result_id);

Returns an integer containing the number of fields in a result set.

  1 
  2 $dbh = ibase_connect ($host, $username, $password);
  3 $stmt = 'SELECT * FROM tblname';
  4 $sth = ibase_query ($dbh, $stmt);
  5 
  6 if (ibase_num_fields($sth) > 0) {
  7     while ($row = ibase_fetch_object ($sth)) {
  8         print $row->email . "\n";
  9     }
 10 } else {
 11     die ("No Results were found for your query");
 12 }
 13 
 14 ibase_close ($dbh);
 15       

See also: ibase_field_info().

Note: Ibase_num_fields() is currently not functional in PHP4.