PHP Velho Oeste 2024

The SQLite3Stmt class

(PHP 5 >= 5.3.0, PHP 7)

소개

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

클래스 개요

SQLite3Stmt {
/* 메소드 */
public bool bindParam ( mixed $sql_param , mixed &$param [, int $type ] )
public bool bindValue ( mixed $sql_param , mixed $value [, int $type ] )
public bool clear ( void )
public bool close ( void )
public SQLite3Result execute ( void )
public int paramCount ( void )
public bool readOnly ( void )
public bool reset ( void )
}

Table of Contents

add a note add a note

User Contributed Notes 1 note

up
3
bohwaz
10 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