Manuál PHP | ||
---|---|---|
Předcházející | Další |
pg_fetch_array() returns an array that corresponds to the fetched row (tuples/records). It returns FALSE, if there are no more rows.
pg_fetch_array() is an extended version of pg_fetch_row(). In addition to storing the data in the numeric indices (field index) to the result array, it also stores the data in associative indices (field name) by default.
Poznámka: Tato funkce nastavuje pole s hodnotou NULL na hodnotu PHP NULL.
row is row (record) number to be retrieved. First row is 0.
result_type is an optional parameter that controls how the return value is initialized. result_type is a constant and can take the following values: PGSQL_ASSOC, PGSQL_NUM, and PGSQL_BOTH. Using PGSQL_NUM, pg_fetch_array() will return an array with numerical indices, using PGSQL_ASSOC will return only associative indices while PGSQL_BOTH, the default, will return both numerical and associative indices.
Poznámka: result_type was added in PHP 4.0.
pg_fetch_array() is NOT significantly slower than using pg_fetch_row(), while it provides a significant ease of use.
Poznámka: From 4.1.0, row became optional. Calling pg_fetch_array() will increment the internal row counter by one.
See also pg_fetch_row(), pg_fetch_object() and pg_fetch_result().
Předcházející | Domů | Další |
pg_fetch_all | Nahoru | pg_fetch_assoc |