1--TEST--
2SQLite3::prepare test, testing for faulty statement
3--CREDITS--
4Michelangelo van Dam
5# Belgian PHP Testfest 2009
6--EXTENSIONS--
7sqlite3
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
16var_dump($stmt);
17?>
18--EXPECTF--
19Warning: SQLite3::prepare(): Unable to prepare statement: 1, no such table: bar in %s on line %d
20bool(false)
21