xref: /PHP-5.5/ext/pgsql/tests/01createdb.phpt (revision daded6e6)
1--TEST--
2PostgreSQL create db
3--SKIPIF--
4<?php include("skipif.inc"); ?>
5--FILE--
6<?php
7// create test table
8
9include('config.inc');
10
11$db = pg_connect($conn_str);
12if (!@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}
19else {
20	echo pg_last_error()."\n";
21}
22
23pg_close($db);
24
25echo "OK";
26?>
27--EXPECT--
28OK
29