Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: PostgreSQL locking from PHP scripts



On Thursday 26 October 2006 11:11, Amal burman <amalburman(at)yahoo(dot)com> wrote:
> postgresql database for this project. Here script one
> (booking.php) tries to setup a lock for update and ask
> user to fill-up the form. Now when the user fill-up
> the form and submit it for update, second script
> (update.php) update the database and releasing the
> locks. 

You can't do this kind of thing in PHP.  PHP resets the database connection 
between scripts.   The script is finished as soon as the page is delivered 
to the client.

Also, web connections are stateless and there is no way to even know what 
web server process or database connection you'll be getting on subsequent 
page views.  

-- 
"It is a besetting vice of democracies to substitute public opinion for
law." - James Fenimore Cooper 

Attachment: pgpcsLIa9tM9b.pgp
Description: PGP signature



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group