Annotation of embedaddon/php/ext/pgsql/tests/01createdb.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: PostgreSQL create db
! 3: --SKIPIF--
! 4: <?php include("skipif.inc"); ?>
! 5: --FILE--
! 6: <?php
! 7: // create test table
! 8:
! 9: include('config.inc');
! 10:
! 11: $db = pg_connect($conn_str);
! 12: if (!@pg_num_rows(@pg_query($db, "SELECT * FROM ".$table_name)))
! 13: {
! 14: @pg_query($db,$table_def); // Create table here
! 15: for ($i=0; $i < $num_test_record; $i++) {
! 16: pg_query($db,"INSERT INTO ".$table_name." VALUES ($i, 'ABC');");
! 17: }
! 18: }
! 19: else {
! 20: echo pg_last_error()."\n";
! 21: }
! 22:
! 23: pg_close($db);
! 24:
! 25: echo "OK";
! 26: ?>
! 27: --EXPECT--
! 28: OK
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>