(PECL CUBRID >= 8.3.0)
cubrid_num_fields — 返回结果集中的列数
示例 #1 cubrid_num_fields() 示例
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$req = cubrid_execute($conn, "SELECT * FROM code");
$row_num = cubrid_num_rows($req);
$col_num = cubrid_num_fields($req);
printf("Row Num: %d\nColumn Num: %d\n", $row_num, $col_num);
cubrid_disconnect($conn);
?>
上面的示例将输出
Row Num: 6 Column Num: 2