php man page for pg_num_rows

Query: pg_num_rows

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

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_affected_rows(3) - php
pg_fetch_row(3) - php
pg_free_result(3) - php
pg_num_fields(3) - php
pg_send_query(3) - php
Similar Topics in the Unix Linux Community
Difference between two rows
return number of rows selected
Merging of rows
extract particular lines from text file
counts for every 1000 interval