mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
For rationale, see #6787 Extensions migrated in part 4: * simplexml * skeleton * soap * spl * sqlite3 * sysvmsg * sysvsem * tidy - also removed a check for an ancient dependency version
33 lines
645 B
PHP
33 lines
645 B
PHP
--TEST--
|
|
Bug #45798 (sqlite3 doesn't notice if variable was bound)
|
|
--EXTENSIONS--
|
|
sqlite3
|
|
--FILE--
|
|
<?php
|
|
|
|
require_once(__DIR__ . '/new_db.inc');
|
|
|
|
$db->exec('CREATE TABLE test (time INTEGER, id STRING)');
|
|
|
|
$db->exec("INSERT INTO test (time, id) VALUES (" . time() . ", 'a')");
|
|
$db->exec("INSERT INTO test (time, id) VALUES (" . time() . ", 'b')");
|
|
|
|
$stmt = $db->prepare("SELECT * FROM test WHERE id = ? ORDER BY id ASC");
|
|
|
|
$stmt->bindParam(1, $foo, SQLITE3_TEXT);
|
|
$results = $stmt->execute();
|
|
|
|
while ($result = $results->fetchArray(SQLITE3_NUM)) {
|
|
var_dump($result);
|
|
}
|
|
|
|
$results->finalize();
|
|
|
|
$db->close();
|
|
|
|
print "done";
|
|
|
|
?>
|
|
--EXPECT--
|
|
done
|