SQLite3::query

Executes an SQL query

&reftitle.description; public ``SQLite3Result``false```SQLite3::query` `string` `query`

Executes an SQL query, returning an `SQLite3Result` object. If the query does not yield a result (such as DML statements) the returned `SQLite3Result` object is not really usable. Use `SQLite3::exec` for such queries instead.

&reftitle.parameters;

`query`

- The SQL query to execute.

&reftitle.returnvalues;

Returns an `SQLite3Result` object, &return.falseforfailure;.

&reftitle.examples;

### `SQLite3::query` example

    <?php
    $db = new SQLite3('mysqlitedb.db');

    $results = $db->query('SELECT bar FROM foo');
    while ($row = $results->fetchArray()) {
        var_dump($row);
    }
    ?>