note 113142 deleted from class.sqlite3stmt by cmb
| From: | cmb@php.net | Date: | Fri, 02 Sep 2016 14:49:41 +0000 |
| Subject: | note 113142 deleted from class.sqlite3stmt by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206480@lists.php.net to get a copy of this message | ||
Note Submitter: bohwaz
----
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
?>