sqlite_array_query
SQLiteDatabase->arrayQuery
Execute a query against a given database and returns an array
Description
arraysqlite_array_query
resourcedbhandle
stringquery
intresult_type
booldecode_binary
arraysqlite_array_query
stringquery
resourcedbhandle
intresult_type
booldecode_binary
Object oriented style (method):
SQLiteDatabase
arrayarrayQuery
stringquery
intresult_type
booldecode_binary
sqlite_array_query is similar to calling
sqlite_query and then
sqlite_fetch_array for each row of the result set
and storing it into an array, as shown in the example below. Calling
sqlite_array_query is significantly faster than
using such a script.
&sqlite.result-type;
&sqlite.case-fold;
&sqlite.decode-bin;
sqlite_array_query implemented yourself
]]>
sqlite_array_query example
arrayQuery('SELECT name, email FROM users LIMIT 25', SQLITE_ASSOC);
foreach ($result as $entry) {
echo 'Name: ' . $entry['name'] . ' E-mail: ' . $entry['email'];
}
?>
]]>
sqlite_array_query is best suited to queries
returning 45 rows or less. If you have more data than that, it is
recommended that you write your scripts to use
sqlite_unbuffered_query instead for more optimal
performance.
&sqlite.param-compat;
See also sqlite_query,
sqlite_fetch_array, and
sqlite_fetch_string.