The SQLite3Stmt class
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
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
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
- SQLite3Stmt::bindParam — Binds a parameter to a statement variable
- SQLite3Stmt::bindValue — Binds the value of a parameter to a statement variable
- SQLite3Stmt::busy — Returns whether the statement has been fetched but not yet completed
- SQLite3Stmt::clear — Clears all current bound parameters
- SQLite3Stmt::close — Closes the prepared statement
- SQLite3Stmt::__construct — Constructs an SQLite3Stmt object
- SQLite3Stmt::execute — Executes a prepared statement and returns a result set object
- SQLite3Stmt::explain — Returns the explain mode of the statement
- SQLite3Stmt::getSQL — Get the SQL of the statement
- SQLite3Stmt::paramCount — Returns the number of parameters within the prepared statement
- SQLite3Stmt::readOnly — Returns whether a statement is definitely read only
- SQLite3Stmt::reset — Resets the prepared statement
- SQLite3Stmt::setExplain — Changes the explain mode of the statement
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
