mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

checks if the prepared statement had been fetched but did not complete yet. close GH-18843
24 lines
504 B
PHP
24 lines
504 B
PHP
--TEST--
|
|
SQLite3_stmt::busy
|
|
--EXTENSIONS--
|
|
sqlite3
|
|
--SKIPIF--
|
|
<?php
|
|
$version = SQLite3::version();
|
|
if ($version['versionNumber'] < 3007004) die("skip");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
require_once(__DIR__ . '/new_db.inc');
|
|
$db->exec('CREATE TABLE test_busy (a string);');
|
|
$db->exec('INSERT INTO test_busy VALUES ("interleaved"), ("statements")');
|
|
$st = $db->prepare('SELECT a FROM test_busy');
|
|
var_dump($st->busy());
|
|
$r = $st->execute();
|
|
$r->fetchArray();
|
|
var_dump($st->busy());
|
|
?>
|
|
--EXPECT--
|
|
bool(false)
|
|
bool(true)
|