You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
478 B

25 years ago
23 years ago
25 years ago
  1. --TEST--
  2. PostgreSQL create db
  3. --SKIPIF--
  4. <?php include("skipif.inc"); ?>
  5. --FILE--
  6. <?php
  7. // create test table
  8. include('config.inc');
  9. $db = pg_connect($conn_str);
  10. if (!@pg_num_rows(@pg_query($db, "SELECT * FROM ".$table_name)))
  11. {
  12. @pg_query($db,$table_def); // Create table here
  13. for ($i=0; $i < $num_test_record; $i++) {
  14. pg_query($db,"INSERT INTO ".$table_name." VALUES ($i, 'ABC');");
  15. }
  16. }
  17. else {
  18. echo pg_last_error()."\n";
  19. }
  20. pg_close($db);
  21. echo "OK";
  22. ?>
  23. --EXPECT--
  24. OK