The SQLite3Stmt class

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

Вступ

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 SQLite3Stmt {
/* Константи */
public const int EXPLAIN_MODE_PREPARED = 0;
public const int EXPLAIN_MODE_EXPLAIN = 1;
/* Методи */
private function __construct(SQLite3 $sqlite3, string $query)
public function bindParam(string|int $param, mixed &$var, int $type = SQLITE3_TEXT): bool
public function bindValue(string|int $param, mixed $value, int $type = SQLITE3_TEXT): bool
public function busy(): bool
public function clear(): bool
public function close(): true
public function execute(): SQLite3Result|false
public function explain(): int
public function getSQL(bool $expand = false): string|false
public function paramCount(): int
public function readOnly(): bool
public function reset(): bool
public function setExplain(int $mode): bool
}

Попередньо визначені константи

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.

Зміст

add a note

User Contributed Notes

There are no user contributed notes for this page.