Code
Result

PHP code example: pg_affected_rows

Returns number of affected records (tuples). See documentation.

You can try this function yourself. Just edit the code and on "Run" to see the result.