The SQLite3Stmt class
(PHP 5 >= 5.3.0, PHP 7)
Введение
Класс предоставляющий доступ к подготовленным запросам в SQLite 3 расширении.
Обзор классов
SQLite3Stmt
{
/* Методы */
public bool readOnly
( void
)
}Содержание
- SQLite3Stmt::bindParam — Binds a parameter to a statement variable
- SQLite3Stmt::bindValue — Binds the value of a parameter to a statement variable
- SQLite3Stmt::clear — Clears all current bound parameters
- SQLite3Stmt::close — Closes the prepared statement
- SQLite3Stmt::execute — Executes a prepared statement and returns a result set object
- 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
Коментарии
There is an undocumented method "readOnly" in this class, as reported on https://bugs.php.net/bug.php?id=65216
This method can be used like this :
<?php
$db = new SQLite3(':memory:');
$db->exec('CREATE TABLE test (column);');
$stmt = $db->prepare('SELECT column FROM test;');
var_dump($stmt->readOnly()); // -> true
$stmt = $db->prepare('INSERT INTO test (42);');
var_dump($stmt->readOnly()); // -> false
?>