Re: Nextval

From: "Papp Gyozo" <pgerzson(at)freestart(dot)hu>
To: "Zavier Sheran" <zsheran(at)yahoo(dot)com>, <pgsql-php(at)postgresql(dot)org>
Subject: Re: Nextval
Date: 2001-10-12 09:26:39
Message-ID: 001b01c152ff$ffbd03c0$01fdfea9@jaguar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hello,

If I understand right what you wrote,
SERIAL is what you need. This object is intended to
handle concurrency as well.

----- Original Message -----
From: "Zavier Sheran" <zsheran(at)yahoo(dot)com>
To: <pgsql-php(at)postgresql(dot)org>
Sent: Friday, October 12, 2001 3:55 AM
Subject: [PHP] Nextval

> I try to do the following:
>
> Fetch a SERIAL field (ie. record_id) and get the
> highest value currently stored (ie. 1000), increment
> the value by 1 and store a record that will have the
> same value (1001) in record_id. So there must be a way
> with concurrency control.
>
> I went through the manuals and found the solution with
> NEXTVAL('serial'), but you have to create a sequence
> for that, and I don't know if it is the right way to
> do for what I want.
>
> It is my first PHP project involving a Database, so
> it's a newbie question. Have mercy...
>
> Thanks
>
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

In response to

  • Nextval at 2001-10-12 01:55:10 from Zavier Sheran

Browse pgsql-php by date

  From Date Subject
Next Message Marco Colombo 2001-10-12 11:56:18 Re: Nextval
Previous Message Zavier Sheran 2001-10-12 01:55:10 Nextval