File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
sqlite3 /
tests /
sqlite3stmt_reset_params.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:02 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
SQLite3Stmt::reset with parameter test
--CREDITS--
Jelle Lampaert
#Belgian Testfest 2009
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
$db = new SQLite3(':memory:');
echo "Creating Table\n";
var_dump($db->exec('CREATE TABLE foobar (id INTEGER, name STRING)'));
echo "INSERT into table\n";
var_dump($db->exec("INSERT INTO foobar (id, name) VALUES (1, 'john')"));
$query = "SELECT name FROM foobar WHERE id = 1";
echo "Prepare query\n";
$stmt = $db->prepare($query);
echo "Reset query\n";
try {
$stmt->reset("foo");
} catch (Exception $ex) {
var_dump($ex->getMessage());
}
echo "Closing database\n";
$stmt = null;
$result = null;
var_dump($db->close());
echo "Done\n";
?>
--EXPECTF--
Creating Table
bool(true)
INSERT into table
bool(true)
Prepare query
Reset query
Warning: SQLite3Stmt::reset() expects exactly 0 parameters, %d given in %s on line %d
Closing database
bool(true)
Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>