Annotation of embedaddon/php/ext/sqlite3/tests/sqlite3_prepare_faultystmt.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SQLite3::prepare test, testing for faulty statement
3: --CREDITS--
4: Michelangelo van Dam
5: # Belgian PHP Testfest 2009
6: --SKIPIF--
7: <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
8: --FILE--
9: <?php
10: $db = new SQLite3(':memory:');
11: $db->exec('CREATE TABLE foo (id INTEGER, bar STRING)');
12: $db->exec("INSERT INTO foo (id, bar) VALUES (1, 'This is a test')");
13:
14: $stmt = $db->prepare('SELECT foo FROM bar');
15:
16: var_dump($stmt);
17: ?>
18: --EXPECTF--
19: Warning: SQLite3::prepare(): Unable to prepare statement: 1, no such table: bar in %s on line %d
20: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>