The SQLite3Stmt class

(PHP 5 >= 5.3.0, PHP 7)

Introducere

A class that handles prepared statements for the SQLite 3 extension.

Sinopsisul clasei

SQLite3Stmt {
/* Metode */
public bindParam ( mixed $sql_param , mixed &$param , int $type = ? ) : bool
public bindValue ( mixed $sql_param , mixed $value , int $type = ? ) : bool
public clear ( ) : bool
public close ( ) : bool
public execute ( ) : SQLite3Result
public getSQL ( bool $expanded = false ) : string|false
public paramCount ( ) : int
public readOnly ( ) : bool
public reset ( ) : bool
}

Cuprins

add a note add a note

User Contributed Notes 1 note

up
3
bohwaz
11 years ago
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

?>
To Top