Re: Automatic increment - Mailing list pgsql-php

From Stephen van Egmond
Subject Re: Automatic increment
Date
Msg-id 20010111224135.A31773@bang.dhs.org
Whole thread Raw
In response to Re: Automatic increment  (GH <grasshacker@over-yonder.net>)
Responses Re: Automatic increment  (GH <grasshacker@over-yonder.net>)
List pgsql-php
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.

pgsql-php by date:

Previous
From: GH
Date:
Subject: Re: Automatic increment
Next
From: GH
Date:
Subject: Re: Automatic increment