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)SYNOPSISint pg_affected_rows (resource $result)DESCRIPTIONpg_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).PARAMETERSo $result - PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others).RETURN VALUESThe number of rows affected by the query. If no tuple is affected, it will return 0.EXAMPLESExample #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 ALSOpg_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_all(3) - php |
pg_field_type(3) - php |
pg_field_type_oid(3) - php |
pg_num_fields(3) - php |
pg_result_status(3) - php |
Similar Topics in the Unix Linux Community |
---|
Troj_dropper.ggs |
Troj_fakealer.dd |
output arguments from a sqlplus |
File Formatting |
Sun Storage Tek 6140 compatible with RHEL5.7? |