RE: [PHP-DB] PostgreSQL and transactions.
| From: | Andrew Chase | Date: | Mon, 08 Oct 2001 22:31:33 +0000 |
| Subject: | RE: [PHP-DB] PostgreSQL and transactions. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13129@lists.php.net to get a copy of this message | ||
I don't know if this is a problem if two different user agents call the same
script simultaneously... it doesn't seem like it would be, but maybe
somebody has more insight into the matter?
If it *is* a problem, maybe it would be possible to work around by using a
session and registering the database connection handler as a session
variable?
-Andy
> -----Original Message-----
> From: Morten Bruun [mailto:morten.bruun@munkey.co.uk]
> Sent: Monday, October 08, 2001 8:10 AM
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] PostgreSQL and transactions.
>
>
> On Mon, 8 Oct 2001, Paul Cooper wrote:
>
> > Above you have used pg_pconnect() which is a persistent
> connection, so it
> > should return the same connection within the script.
> Theoretically if you
> > use pg_connect it should do what you want - but you don't seem to need 2
> > connections (unless i'm missing something).
> >
>
> Yup, using pg_pconnect() was an error, but even if I use pg_connect() it
> will only create one connection... My worst fear was that two
> simultaneous hits would get the same connection.
>
> --
> Morten Bruun
>
>