(PHP 5 >= 5.3.0, PHP 7)
Executes an SQL query
public SQLite3Result SQLite3::query ( string $query )
Executes an SQL query, returning an SQLite3Result object if the query returns results.
Parameters:
query
The SQL query to execute.
Returns:
Returns an SQLite3Result object if the query returns results. Otherwise, returns TRUE
if the query succeeded, FALSE
on failure.
Examples:
SQLite3::query() example
1 2 3 4 5 6 7 8 | <?php $db = new SQLite3( 'mysqlitedb.db' ); $results = $db ->query( 'SELECT bar FROM foo' ); while ( $row = $results ->fetchArray()) { var_dump( $row ); } ?> |
Please login to continue.