pg_num_rows() will return the number of rows in a PostgreSQL result resource. result is a query result resource returned by pg_query(). This function will return -1 on error.
Note: Use pg_affected_rows() to get number of rows affected by INSERT, UPDATE and DELETE query.
Note: This function used to be called pg_numrows().
Deliver First Class Web Sites: 101 Essential Checklists Want to learn how to make your web sites usable and accessible? Want to ensure that your sites meet current best practice, without spending hours trawling through incomprehensible specifications and recommendations from dozens of different books, research papers, and web sites? Want to make sure that the sites you build are "right the first time," requiring no costly redevelopments?