Re: Automatic increment - Mailing list pgsql-php

From GH
Subject Re: Automatic increment
Date
Msg-id 20010111215430.A76932@over-yonder.net
Whole thread Raw
In response to Re: Automatic increment  (Stephen van Egmond <svanegmond@bang.dhs.org>)
List pgsql-php
On Thu, Jan 11, 2001 at 10:41:35PM -0500, some SMTP stream spewed forth:
> GH (grasshacker@over-yonder.net) wrote:
> > I believe that it is commonly preferred to do:
> > select nextval('sequence');
> > insert into foo (foo_id,...) values (<nextval>, ...);
>
>
> Many people do the first SELECT on a form, stuff the result in a hidden
> variable, then do the INSERT in the form's handler.  This prevents the
> double- (or triple-) clicking of "submit" resulting in extra database
> inserts.

My humble appreciation to you for bringing to my attention that which I
(unbelievably - to me, anyway ;-) ) overlooked.

*bow out into the darkness of the wild Internet yonder*

gh


pgsql-php by date:

Previous
From: Stephen van Egmond
Date:
Subject: Re: Automatic increment
Next
From: Louis Bertrand
Date:
Subject: pg_loopen() error