SQLite3::query
(PHP 5 >= 5.3.0)
SQLite3::query — Executes an SQL query
Descrição
Executes an SQL query, returning an SQLite3Result object if the query returns results.
Parâmetros
-
query -
The SQL query to execute.
Valor Retornado
Returns an SQLite3Result object if the query returns results. Otherwise,
returns TRUE if the query succeeded, FALSE on failure.
Exemplos
Example #1 SQLite3::query() example
<?php
$db = new SQLite3('mysqlitedb.db');
$results = $db->query('SELECT bar FROM foo');
while ($row = $results->fetchArray()) {
var_dump($row);
}
?>