PHP.nl

pg_num_rows

pg_num_rows

Returns the number of rows in a result

int **pg_num_rows** PgSql\Result $result
will return the number of rows in

an instance. pg_num_rows``PgSql\Result

Opmerking: > This function used to be called . pg_numrows

result

The number of rows in the result. On error, is returned. -1

Voorbeeld: example

<?php
$result = pg_query($conn, "SELECT 1");

$rows = pg_num_rows($result);

echo $rows . " row(s) returned.\n";
?>
1 row(s) returned.

pg_num_fields``pg_affected_rows