File: 01createdb.phpt

package info (click to toggle)
php4 4%3A4.3.10-22
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 32,092 kB
  • ctags: 34,843
  • sloc: ansic: 337,959; php: 15,650; sh: 9,211; cpp: 7,791; lex: 2,157; yacc: 1,712; xml: 1,077; java: 455; makefile: 435; awk: 352; perl: 154
file content (28 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
PostgreSQL create db
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
// create test table 

include('config.inc');

$db = pg_connect($conn_str);
if (!@pg_num_rows(@pg_query($db, "SELECT * FROM ".$table_name))) 
{
	@pg_query($db,$table_def); // Create table here
	for ($i=0; $i < $num_test_record; $i++) {
		pg_query($db,"INSERT INTO ".$table_name." VALUES ($i, 'ABC');");
	}
}
else {
	echo pg_last_error()."\n";
}

pg_close($db);

echo "OK";
?>
--EXPECT--
OK