transaction login in pgsql not working
[email protected] (Burak DAYIOGLU) Tue, 13 Mar 2001 11:29:38 +0200
| Newsgroups | php.pear |
|---|---|
| Message-ID | <[email protected]> |
Although looking to be correctly implemented in simplequery(), commit()
and rollback(), tranaction login in pgsql.php is not working. The below
is a small demostrative code just written to test transaction logic:
$database=DB::factory("pgsql");
$dsn=array(phptype=>"pgsql",hostspec=>"localhost",database=>"kek");
$database->connect($dsn);
$database->autocommit(FALSE);
var_dump($database); echo "<HR>";
$handle=$database->simplequery("insert into names values (1,'burak')");
var_dump($database); echo "<HR>";
$handle=$database->simplequery("insert into cities values
(2,'ankara')");
$database->rollback();
var_dump($database); echo "<HR>";
When run, on my linux box, it gives the following output. Please note
the
transaction_opcount's:
object(db_pgsql)(18) { ["prepare_tokens"]=> array(0) { }
["prepare_types"]=>array(0) { } ["transaction_opcount"]=> int(0)
........
---------------------------------------------------------------------
object(db_pgsql)(18) { ["prepare_tokens"]=> array(0) { }
["prepare_types"]=> array(0) { } ["transaction_opcount"]=> int(0)
.......
---------------------------------------------------------------------
object(db_pgsql)(18) { ["prepare_tokens"]=> array(0) { }
["prepare_types"]=> array(0) { } ["transaction_opcount"]=> int(0)
......
---------------------------------------------------------------------
When the sql statements are given over the psql interface they do work
seamless. I am investigating the problem further, however any help from
more experienced PEAR ppl is gladly accepted. :)
regards,
-bd