PAL.C.T MINI SHELL
--TEST--
Bug #45798 (sqlite3 doesn't notice if variable was bound)
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
require_once(dirname(__FILE__) . '/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
�
y���~�or�5�J�={��E��e�u磝Qk��ᯘG{�?���+�]������ן�?w�M3X^��歌>{�7پ�K�>�o��n�\����j�y��R���g/�=��f�O��r�o��NV�v��~�Y+��NG�u���Ý����HW��y�w�[eQ�ʨ�S�b��>������>�}G�mx[o[<��{���Ϯ_��qF���vMIEND�B`�