pg_num_rows(3) php man page | unix.com

Man Page: pg_num_rows

Operating Environment: php

Section: 3

PG_NUM_ROWS(3)															    PG_NUM_ROWS(3)

pg_num_rows - Returns the number of rows in a result

SYNOPSIS
int pg_num_rows (resource $result)
DESCRIPTION
pg_num_rows(3) will return the number of rows in a PostgreSQL result resource. Note This function used to be called pg_numrows(3).
PARAMETERS
o $result - PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others).
RETURN VALUES
The number of rows in the result. On error, -1 is returned.
EXAMPLES
Example #1 pg_num_rows(3) example <?php $result = pg_query($conn, "SELECT 1"); $rows = pg_num_rows($result); echo $rows . " row(s) returned. "; ?> The above example will output: 1 row(s) returned.
SEE ALSO
pg_num_fields(3), pg_affected_rows(3). PHP Documentation Group PG_NUM_ROWS(3)
Related Man Pages
pg_fetch_result(3) - php
pg_fetch_all(3) - php
pg_field_is_null(3) - php
pg_num_rows(3) - php
pg_result_seek(3) - php
Similar Topics in the Unix Linux Community
return number of rows selected
sum of all matching rows using awk
Counting rows in many files
How to delete rows by RowNumber from a Large text file
Remove comma and next rows beginning from the end