From: enediel gonzalez <enediel@hotmail.com>
To: pgsql-php@postgresql.org
Subject: postgresql 7.3 php transaction problem
Date: Sun, 26 Feb 2006 02:51:22 +0000
Message-ID: <BAY104-F234E88A747C80E97178E0A5F10@phx.gbl> (raw)
In-Reply-To: <20060226023451.D83171B8089@mx1.hub.org>
Hello
I need a complex transaction that should update some database tables.
The updated tables inside the transaction should be used also to find
information during the transaction process.
BEGIN (I created the transaction)
First iteration
i(0)
I created a record into the 'products_inventory' table (sucess)
Second iteration
i(1)
select pk from products_inventory where (nu_product = 4) and (serial_number
= '9087') and (quantity > 0)
Warning: pg_query(): Query failed: ERROR: current transaction is aborted,
commands ignored until end of transaction block
this query fails on the second iteration (the query is sintactically
correct.
I tried to create a whole batch to lauch the transaction completelly in the
following form
BEGIN;
statement;
statement;
statement;
...
COMMIT;
launching the script from the php page fails, but taking the same script and
using phppgadmin, the same script sucess.
Another question about transactions in postgresql
?Is it possible inside the transaction to see the changes ocurred into the
database ,resulting of the previous statements executed on the same
transaction?
Thanks in advance for any help or explanation
Regards
Enediel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: enediel@hotmail.com
Subject: Re: postgresql 7.3 php transaction problem
In-Reply-To: <BAY104-F234E88A747C80E97178E0A5F10@phx.gbl>
References: <20060226023451.D83171B8089@mx1.hub.org> <BAY104-F234E88A747C80E97178E0A5F10@phx.gbl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox