©
本文档使用
php.cn手册 发布
(PHP 5 >= 5.3.0)
处理 SQLite 3 扩展语句模板的类。
$sql_param
, mixed &$param
[, int $type
] )$sql_param
, mixed $value
[, int $type
] )[#1] bohwaz [2013-09-05 03:42:44]
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
?>