Re: Automatic increment

From: Stephen van Egmond <svanegmond(at)bang(dot)dhs(dot)org>
To: GH <grasshacker(at)over-yonder(dot)net>
Cc: svanegmond(at)home(dot)com, "Julio Cuz, Jr(dot)" <jcuz(at)rccd(dot)cc(dot)ca(dot)us>, pgsql-php(at)postgresql(dot)org
Subject: Re: Automatic increment
Date: 2001-01-12 03:41:35
Message-ID: 20010111224135.A31773@bang.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php pgsql-sql

GH (grasshacker(at)over-yonder(dot)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.

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message GH 2001-01-12 03:54:30 Re: Automatic increment
Previous Message GH 2001-01-12 03:25:23 Re: Automatic increment

Browse pgsql-sql by date

  From Date Subject
Next Message GH 2001-01-12 03:54:30 Re: Automatic increment
Previous Message GH 2001-01-12 03:25:23 Re: Automatic increment