Search DaTutorials:  
HOME
Php Tutorials
Articles
Basics
Date and Time
File Manipulations
Forms
Functions
General
Interactivity
MySql
Navigation
News,Shoutboxes and Blogs
Language Structure and Data Types
Searching
Security
String Manipulation
User Information and Stats
Search For a Tutorial
Php Reference

sqlite_array_query

(PHP 5)

sqlite_array_query -- Execute a query against a given database and returns an array.

Description

array sqlite_array_query ( resource dbhandle, string query [, int result_type [, bool decode_binary]])

array sqlite_array_query ( string query, resource dbhandle [, int result_type [, bool decode_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.

Example 1. sqlite_array_query() implemented yourself

<?php
$q
= sqlite_query($dbhandle, "SELECT * from foo LIMIT 100");
$rows = array();
while (
$r = sqlite_fetch_array($q)) {
  
$rows[] = $r;
}
?>

Tip: 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.

See also sqlite_query(), sqlite_fetch_array(), and sqlite_fetch_string().



Copyright © 2001-2004 The PHP Group
All rights reserved.

     Pay Day Loans | Bad Credit Mortgages | Loans | Flights | Loans
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp