ibase_num_fields

(PHP 3>= 3.0.7, PHP 4 )

ibase_num_fields --  result set의 필드의 수를 얻는다.

Description

int ibase_num_fields ( int result_id)

결가 셋의 필드의 수를 정수의 형으로 리턴한다.

<?php
    $dbh = ibase_connect ($host, $username, $password);
    $stmt = 'SELECT * FROM tblname';
    $sth = ibase_query ($dbh, $stmt);

    if (ibase_num_fields($sth) > 0) {
        while ($row = ibase_fetch_object ($sth)) {
            print $row->email . "\n";
        }
    } else {
        die ("No Results were found for your query");
    }

    ibase_close ($dbh);
?>

See also: ibase_field_info().

참고: ibase_num_fields()는 일반적으로 PHP 4에서 작동하지 않는다.