Query: pg_fetch_row
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
PG_FETCH_ROW(3) PG_FETCH_ROW(3) pg_fetch_row - Get a row as an enumerated arraySYNOPSISarray pg_fetch_row (resource $result, [int $row])DESCRIPTIONpg_fetch_row(3) fetches one row of data from the result associated with the specified $result resource. Note This function sets NULL fields to the PHP NULL value.PARAMETERSo $result - PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others). o $row - Row number in result to fetch. Rows are numbered from 0 upwards. If omitted or NULL, the next row is fetched.RETURN VALUESAn array, indexed from 0 upwards, with each value represented as a string. Database NULL values are returned as NULL. FALSE is returned if $row exceeds the number of rows in the set, there are no more rows, or on any other error.EXAMPLESExample #1 pg_fetch_row(3) example <?php $conn = pg_pconnect("dbname=publisher"); if (!$conn) { echo "An error occurred. "; exit; } $result = pg_query($conn, "SELECT author, email FROM authors"); if (!$result) { echo "An error occurred. "; exit; } while ($row = pg_fetch_row($result)) { echo "Author: $row[0] E-mail: $row[1]"; echo "<br /> "; } ?>SEE ALSOpg_query(3), pg_fetch_array(3), pg_fetch_object(3), pg_fetch_result(3). PHP Documentation Group PG_FETCH_ROW(3)
Related Man Pages |
---|
mssql_fetch_row(3) - php |
pg_fetch_array(3) - php |
pg_fetch_row(3) - php |
pg_field_is_null(3) - php |
pg_query(3) - php |
Similar Topics in the Unix Linux Community |
---|
Setting script exit code |
How to delete a row in a file |
Sort each row (horizontally) in AWK or any |
Removing Duplicate Rows in a file |
Egrep find word that occurs twice in a row |