sqlite3_33_reset.phpt 644 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. SQLite3:: reset
  3. --CREDITS--
  4. Ward Hus & James Cauwelier
  5. #@ PHP TESTFEST 2009 (BELGIUM)
  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. $stmt = $db->prepare('SELECT bar FROM foo WHERE id=:id');
  14. $stmt->bindValue(':id', 1, SQLITE3_INTEGER);
  15. $stmt->reset("dummy");
  16. $stmt->reset();
  17. //var_dump($db);
  18. //var_dump($db->close());
  19. echo "Done\n";
  20. ?>
  21. --EXPECTF--
  22. Warning: SQLite3Stmt::reset() expects exactly 0 parameters, 1 given in %s on line %d
  23. Done