File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / pgsql / tests / 80_bug42783.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:59 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
Bug #42783 (pg_insert() does not support an empty value array)
--SKIPIF--
<?php 
require_once('skipif.inc');
?>
--FILE--
<?php

require_once('config.inc');
	
$dbh = @pg_connect($conn_str);
if (!$dbh) {
	die ("Could not connect to the server");
}

pg_query("CREATE TABLE php_test (id SERIAL PRIMARY KEY, time TIMESTAMP NOT NULL DEFAULT now())");

pg_insert($dbh, 'php_test', array());

var_dump(pg_fetch_assoc(pg_query("SELECT * FROM php_test")));

pg_query($dbh, "DROP TABLE php_test");
pg_close($dbh);
?>
===DONE===
--EXPECTF--
array(2) {
  ["id"]=>
  string(%d) "%d"
  ["time"]=>
  string(%d) "%s"
}
===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>