pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Charley Tiggs <lists@tiggs.net>
To: Herbie McDuck <herbie@faams.net>
Cc: pgsql-php@postgresql.org
Subject: Re: PostgreSQL locking from PHP scripts
Date: Mon, 06 Nov 2006 19:56:23 -0600
Message-ID: <454FE7C7.2030102@tiggs.net> (raw)
In-Reply-To: <454FD71E.6070807@faams.net>
References: <20061026181147.50048.qmail@web51309.mail.yahoo.com>
	<200611061105.29055@hal.medialogik.com>
	<454FD71E.6070807@faams.net>

Herbie McDuck wrote:
>> 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. 
>>   
> So is PHP and 'ANY' database a useless adventure when it goes to 
> developing a robust business and accounting package?

Not at all.  It just means that you'll have to create your own "state" 
logic using sessions.  For instance, create a column within the 
necessary table that you can check to see whether or not some other 
process/user is using the record in question and then build the 
necessary logic around that to enable/disable access to the records.

This is something that isn't specific to PHP.  You'll encounter the same 
issues with any other middleware language that uses a web browser as 
it's primary means of interaction.  HTTP just doesn't keep track of the 
state of your application.  It's up to you as the developer to handle that.

Charley



view thread (12+ messages)  latest in thread

Message-ID: <454FE7C7.2030102@tiggs.net>
Permalink:  ../454FE7C7.2030102@tiggs.net/
Also on:    postgresql.org/message-id/454FE7C7.2030102@tiggs.net

 · 

reply

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: lists@tiggs.net, herbie@faams.net
  Subject: Re: PostgreSQL locking from PHP scripts
  In-Reply-To: <454FE7C7.2030102@tiggs.net>
  References: <20061026181147.50048.qmail@web51309.mail.yahoo.com> <200611061105.29055@hal.medialogik.com> <454FD71E.6070807@faams.net> <454FE7C7.2030102@tiggs.net>

* 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