sqlite3_02_create.phpt 661 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. SQLite3::query CREATE tests
  3. --EXTENSIONS--
  4. sqlite3
  5. --FILE--
  6. <?php
  7. require_once(__DIR__ . '/new_db.inc');
  8. echo "Creating Table\n";
  9. var_dump($db->exec('CREATE TABLE test (time INTEGER, id STRING)'));
  10. echo "Creating Same Table Again\n";
  11. var_dump($db->exec('CREATE TABLE test (time INTEGER, id STRING)'));
  12. echo "Dropping database\n";
  13. var_dump($db->exec('DROP TABLE test'));
  14. echo "Closing database\n";
  15. var_dump($db->close());
  16. echo "Done\n";
  17. ?>
  18. --EXPECTF--
  19. Creating Table
  20. bool(true)
  21. Creating Same Table Again
  22. Warning: SQLite3::exec(): table test already exists in %s on line %d
  23. bool(false)
  24. Dropping database
  25. bool(true)
  26. Closing database
  27. bool(true)
  28. Done