transaction across pages
| From: | Bernie Huang | Date: | Wed, 25 Oct 2000 19:29:10 +0000 |
| Subject: | transaction across pages | ||
| Groups: | php.db php.general | ||
| Request: | Send a blank email to php-db+get-3886@lists.php.net to get a copy of this message | ||
Hi, PHPers
I tried the following testing scripts, but it failed. In php1.php, it
have problems sometimes shows the results. And in php2.php, it produce
an error of not able to execute query or index error upon pg_close. How
can I do one trasaction across multiple scripts? btw, I am using
persistent connection.
Thanks very much.
eg;
php1.php
---------
$conn = pg_connect;
BEGIN;
SELECT ...
INSERT ...
<a href=php2.php?conn=$conn>next page</a>
php2.php
--------
SELECT ...
UPDATE ...
COMMIT; (or ROLLBACK;)
pg_close($conn);
- Bernie