(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
pg_num_rows — 返回行的數目
$result
): int
pg_num_rows() 返回 PostgreSQL result
中的行的數目。result
參數是由 pg_query() 函數返回的查詢(xún)結果資源號。如果出錯則返回 -1。
注意:
用 pg_affected_rows() 函數獲得被 INSERT,UPDATE 和 DELETE 命令影響到的行的數目。
注意:
本函數以前的名字為
pg_numrows()
。
參見(jiàn) pg_num_fields() 和 pg_affected_rows()。