pg_cmdtuples

(PHP3 , PHP4 )

pg_cmdtuples -- Returns number of affected tuples

Description

int pg_cmdtuples (int result_id)

Pg_cmdtuples() returns the number of tuples (instances) affected by INSERT, UPDATE, and DELETE queries. If no tuple is affected the function will return 0.

Example 1. Pg_cmdtuples()


<?php
$result = pg_exec ($conn, "INSERT INTO publisher VALUES ('Author')");
$cmdtuples = pg_cmdtuples ($result);
echo $cmdtuples . " <- cmdtuples affected.";
?>
      


Hosted by Tonec Inc.