php man page for pg_affected_rows

Query: pg_affected_rows

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

PG_AFFECTED_ROWS(3)													       PG_AFFECTED_ROWS(3)

pg_affected_rows - Returns number of affected records (tuples)

SYNOPSIS
int pg_affected_rows (resource $result)
DESCRIPTION
pg_affected_rows(3) returns the number of tuples (instances/records/rows) affected by INSERT, UPDATE, and DELETE queries. Since PostgreSQL 9.0 and above, the server returns the number of SELECTed rows. Older PostgreSQL return 0 for SELECT. Note This function used to be called pg_cmdtuples(3).
PARAMETERS
o $result - PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others).
RETURN VALUES
The number of rows affected by the query. If no tuple is affected, it will return 0.
EXAMPLES
Example #1 pg_affected_rows(3) example <?php $result = pg_query($conn, "INSERT INTO authors VALUES ('Orwell', 2002, 'Animal Farm')"); $cmdtuples = pg_affected_rows($result); echo $cmdtuples . " tuples are affected. "; ?> The above example will output: 1 tuples are affected.
SEE ALSO
pg_query(3), pg_query_params(3), pg_execute(3), pg_num_rows(3). PHP Documentation Group PG_AFFECTED_ROWS(3)
Related Man Pages
pg_fetch_result(3) - php
pg_field_num(3) - php
pg_fetch_all(3) - php
pg_fetch_all_columns(3) - php
pg_num_rows(3) - php
Similar Topics in the Unix Linux Community
Troj_dropper.ggs
Troj_fakealer.dd
Extract resultset numeric value from isql output ?
File Formatting
Sun Storage Tek 6140 compatible with RHEL5.7?