ibase_num_fields

(PHP 5, PHP 7 < 7.4.0)

ibase_num_fields — 결과 세트의 필드 수 가져오기


설명

ibase_num_fields(resource $result_id): int

결과 집합의 필드 수를 가져옵니다.


매개변수

result_id
InterBase 결과 식별자입니다.

반환 값

필드 수를 정수로 반환합니다.


Examples

예제 #1 ibase_num_fields() 예제

                  
<?php
$rs = ibase_query("SELECT * FROM tablename");
$coln = ibase_num_fields($rs);
for ($i = 0; $i < $coln; $i++) {
    $col_info = ibase_field_info($rs, $i);
    echo "name: " . $col_info['name'] . "\n";
    echo "alias: " . $col_info['alias'] . "\n";
    echo "relation: " . $col_info['relation'] . "\n";
    echo "length: " . $col_info['length'] . "\n";
    echo "type: " . $col_info['type'] . "\n";
}
?>
                  
                

기타