The SQLite3Stmt class

Introduction

A class that handles prepared statements for the SQLite 3 extension. Instances are obtained from SQLite3::prepare. Calling SQLite3Stmt::execute runs the query and returns a SQLite3Result for result sets.

Class synopsis

SQLite3Stmt
/* Constants */
public const int SQLite3Stmt::EXPLAIN_MODE_PREPARED = 0;
public const int SQLite3Stmt::EXPLAIN_MODE_EXPLAIN = 1;
public const int SQLite3Stmt::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN = 2;
/* Methods */
private __construct(SQLite3 $sqlite3, string $query)
public bool bindParam(stringint $param, mixed &$var, int $type = SQLITE3_TEXT)
public bool bindValue(stringint $param, mixed $value, int $type = SQLITE3_TEXT)
public bool busy()
public bool clear()
public true close()
public SQLite3Resultfalse execute()
public int explain()
public stringfalse getSQL(bool $expand = false)
public int paramCount()
public bool readOnly()
public bool reset()
public bool setExplain(int $mode)

Predefined Constants

SQLite3Stmt::EXPLAIN_MODE_PREPARED
The statement operates in normal prepared statement mode (no EXPLAIN). Available as of PHP 8.5.0, when compiled against libsqlite >= 3.43.0.
SQLite3Stmt::EXPLAIN_MODE_EXPLAIN
The statement operates as if prefixed with EXPLAIN, returning opcode information from the virtual machine. Available as of PHP 8.5.0, when compiled against libsqlite >= 3.43.0.
SQLite3Stmt::EXPLAIN_MODE_EXPLAIN_QUERY_PLAN
The statement operates as if prefixed with EXPLAIN QUERY PLAN, returning high-level query plan information. Available as of PHP 8.5.0, when compiled against libsqlite >= 3.43.0.
Table of Contents