Annotation of embedaddon/php/ext/sqlite3/tests/sqlite3_20_error.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SQLite3 error functions
3: --SKIPIF--
4: <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5: --FILE--
6: <?php
7:
8: require_once(dirname(__FILE__) . '/new_db.inc');
9:
10: echo "SELECTING from invalid table\n";
11: $result = $db->query("SELECT * FROM non_existent_table");
12: if (!$result) {
13: echo "Error Code: " . $db->lastErrorCode() . "\n";
14: echo "Error Msg: " . $db->lastErrorMsg() . "\n";
15: }
16: echo "Closing database\n";
17: var_dump($db->close());
18: echo "Done\n";
19: ?>
20: --EXPECTF--
21: SELECTING from invalid table
22:
23: Warning: SQLite3::query(): Unable to prepare statement: 1, no such table: non_existent_table in %s on line %d
24: Error Code: 1
25: Error Msg: no such table: non_existent_table
26: Closing database
27: bool(true)
28: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>