sqlite_fetch_all
SQLiteResult::fetchAll
SQLiteUnbuffered::fetchAll
Fetches all rows from a result set as an array of arrays
&reftitle.description;
arraysqlite_fetch_all
resourceresult
intresult_typeSQLITE_BOTH
booldecode_binarytrue
&style.oop; (method):
arraySQLiteResult::fetchAll
intresult_typeSQLITE_BOTH
booldecode_binarytrue
arraySQLiteUnbuffered::fetchAll
intresult_typeSQLITE_BOTH
booldecode_binarytrue
sqlite_fetch_all returns an array of the entire result
set from the result resource. It is similar to calling
sqlite_query (or
sqlite_unbuffered_query) and then
sqlite_fetch_array for each row in the result set.
&reftitle.parameters;
result
The SQLite result resource. This parameter is not required when using
the object-oriented method.
result_type
&sqlite.result-type;
decode_binary
&sqlite.decode-bin;
&reftitle.returnvalues;
Returns an array of the remaining rows in a result set. If called right
after sqlite_query, it returns all rows. If called
after sqlite_fetch_array, it returns the rest. If
there are no rows in a result set, it returns an empty array.
&sqlite.case-fold;
&reftitle.examples;
Procedural example
]]>
Object-oriented example
query('SELECT name, email FROM users LIMIT 25'); // buffered result set
$query = $dbhandle->unbufferedQuery('SELECT name, email FROM users LIMIT 25'); // unbuffered result set
$result = $query->fetchAll(SQLITE_ASSOC);
foreach ($result as $entry) {
echo 'Name: ' . $entry['name'] . ' E-mail: ' . $entry['email'];
}
?>
]]>
&reftitle.seealso;
sqlite_fetch_array