cvs: php4 /ext/pgsql/tests config.inc createdb.inc large_object.inc

From: Date: Fri, 05 Apr 2002 06:06:21 +0000
Subject: cvs: php4 /ext/pgsql/tests config.inc createdb.inc large_object.inc
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10884@lists.php.net to get a copy of this message
yohgaki Fri Apr 5 01:06:21 2002 EDT Modified files: /php4/ext/pgsql/tests config.inc createdb.inc large_object.inc Log: Add bytea field to test table. Use table name variable. Index: php4/ext/pgsql/tests/config.inc diff -u php4/ext/pgsql/tests/config.inc:1.2 php4/ext/pgsql/tests/config.inc:1.3 --- php4/ext/pgsql/tests/config.inc:1.2 Sun Dec 16 21:09:07 2001 +++ php4/ext/pgsql/tests/config.inc Fri Apr 5 01:06:20 2002 @@ -6,7 +6,7 @@ $table_name = "php_pgsql_test"; // test table that should be exist $num_test_record = 1000; // Number of records to create -$table_def = "CREATE TABLE php_pgsql_test (num int, str text);"; // Test table +$table_def = "CREATE TABLE php_pgsql_test (num int, str text, bin bytea);"; // Test table $field_name = "num"; // For pg_field_num() ?> Index: php4/ext/pgsql/tests/createdb.inc diff -u php4/ext/pgsql/tests/createdb.inc:1.1 php4/ext/pgsql/tests/createdb.inc:1.2 --- php4/ext/pgsql/tests/createdb.inc:1.1 Sun Dec 16 19:16:48 2001 +++ php4/ext/pgsql/tests/createdb.inc Fri Apr 5 01:06:21 2002 @@ -8,7 +8,7 @@ { @pg_query($db,$table_def); for ($i=0; $i < $num_test_record; $i++) { - pg_query($db,"INSERT INTO php_pgsql_test VALUES ($i, 'ABC');"); + pg_query($db,"INSERT INTO ".$table_name." VALUES ($i, 'ABC');"); } } else { Index: php4/ext/pgsql/tests/large_object.inc diff -u php4/ext/pgsql/tests/large_object.inc:1.1 php4/ext/pgsql/tests/large_object.inc:1.2 --- php4/ext/pgsql/tests/large_object.inc:1.1 Sun Dec 16 19:16:48 2001 +++ php4/ext/pgsql/tests/large_object.inc Fri Apr 5 01:06:21 2002 @@ -2,7 +2,7 @@ include('config.inc'); -$db = pg_connect("host=localhost"); +$db = pg_connect($conn_str); pg_exec ($db, "begin"); $oid = pg_lo_create ($db); if (!$oid) echo ("pg_lo_create() error\n");

« previous php.cvs (#10884) next »