SQLite3::prepare
SQLite3::querySingle
SQLite3
PHP Manual

# SQLite3::query

(PHP 5 >= 5.3.0)

SQLite3::query — Executes an SQL query

### 설명

public SQLite3_result SQLite3::query ( string `$query` )

Executes an SQL query, returning an SQLite3_result object if the query returns results.

### 인수

`query`

  The SQL query to execute.

### 반환값

Returns an SQLite3_result object if the query returns results. Otherwise, returns `TRUE` if the query succeeded, `FALSE` on failure.

### 예제

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);
}
?>`

SQLite3::prepare
SQLite3::querySingle
SQLite3
PHP Manual