Re: transaction across pages

From: Date: Wed, 25 Oct 2000 22:38:53 +0000
Subject: Re: transaction across pages
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3896@lists.php.net to get a copy of this message
Is that the whole script? Or just basic output? It wouldn't even be a script if it was, there's no php start and ending tags.. ----- Original Message ----- From: Bernie Huang <bernie.huang@ec.gc.ca> To: PHP list <php-general@lists.php.net>; PHP-PGSQL <php-pgsql@linuxports.com>; PHP Database <php-db@lists.php.net> Sent: Wednesday, October 25, 2000 11:29 AM Subject: [PHP-DB] transaction across pages > 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 > > ---------------------------------------------------------------------------- ---- > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#3896) next »