1--TEST--
2SQLite3Stmt::clear test with parameters
3--CREDITS--
4Thijs Feryn <thijs@feryn.eu>
5#TestFest PHPBelgium 2009
6--SKIPIF--
7<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
8--FILE--
9<?php
10$db = new SQLite3(':memory:');
11define('TIMENOW', time());
12echo "Creating Table\n";
13$db->exec('CREATE TABLE test (time INTEGER, id STRING)');
14echo "INSERT into table\n";
15var_dump($db->exec("INSERT INTO test (time, id) VALUES (" . TIMENOW . ", 'b')"));
16
17echo "SELECTING results\n";
18$stmt = $db->prepare("SELECT * FROM test WHERE id = ? ORDER BY id ASC");
19var_dump($stmt->clear('invalid argument'));
20echo "Closing database\n";
21var_dump($db->close());
22echo "Done\n";
23?>
24--EXPECTF--
25Creating Table
26INSERT into table
27bool(true)
28SELECTING results
29
30Warning: SQLite3Stmt::clear() expects exactly 0 parameters, 1 given in %s on line %d
31NULL
32Closing database
33bool(true)
34Done
35