int pg_numrows
pg_NumRows() will return the number of rows in a PostgreSQL result. The argument is a valid result identifier returned by pg_Exec(). This function will return -1 on error.