Description
int
pg_affected_rows ( resource result)
pg_affected_rows() returns the number of tuples
(instances/records/rows) affected by INSERT, UPDATE, and DELETE
queries executed by pg_query()_ If no tuple is
affected by this function, it will return 0_
Ejemplo 1_ pg_affected_rows() example <?php
$result = pg_query($conn, "INSERT INTO authors VALUES ('Orwell', 2002, 'Animal Farm')");
$cmdtuples = pg_affected_rows($result);
echo $cmdtuples _ " tuples are affected_\n";
?> |
|
Nota:
This function used to be called pg_cmdtuples()_
See also pg_query() and
pg_num_rows()_