ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:recordset:fetchrow

fetchRow

Syntax
mixed fetchRow()

Description

The function fetchRow() returns the current row of a recordset as an array or false if past end-of-file and advances the pointer of the result. If the end-of-file is reached, the EOF attribute is set

Results are influenced both by the ADODB_ASSOC_CASE constant and $ADODB_FETCH_MODE attribute


Usage

/*
 * Database connection assumed
 */
$SQL = "SELECT * FROM act"
$result = $db->execute($SQL);
while($r = $result->fetchRow())
    print_r($r);
/*
 * Array returns
Array(
    [0] => 10,
    [1] => ROW 1
    )
    .....
*/
v5/reference/recordset/fetchrow.txt · Last modified: 2016/01/16 23:36 by mnewnham