php-src/ext/sqlite3/tests/sqlite3_prepare_faultystmt.phpt
Max Semenik 7f2f0c007c Migrate skip checks to --EXTENSIONS--, p4
For rationale, see #6787

Extensions migrated in part 4:
* simplexml
* skeleton
* soap
* spl
* sqlite3
* sysvmsg
* sysvsem
* tidy - also removed a check for an ancient dependency version
2021-04-08 10:36:44 +02:00

20 lines
504 B
PHP

--TEST--
SQLite3::prepare test, testing for faulty statement
--CREDITS--
Michelangelo van Dam
# Belgian PHP Testfest 2009
--EXTENSIONS--
sqlite3
--FILE--
<?php
$db = new SQLite3(':memory:');
$db->exec('CREATE TABLE foo (id INTEGER, bar STRING)');
$db->exec("INSERT INTO foo (id, bar) VALUES (1, 'This is a test')");
$stmt = $db->prepare('SELECT foo FROM bar');
var_dump($stmt);
?>
--EXPECTF--
Warning: SQLite3::prepare(): Unable to prepare statement: 1, no such table: bar in %s on line %d
bool(false)