pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Zavier Sheran <zsheran@yahoo.com>
To: pgsql-php@postgresql.org
Subject: Nextval
Date: Thu, 11 Oct 2001 18:55:10 -0700 (PDT)
Message-ID: <20011012015510.73010.qmail@web14402.mail.yahoo.com> (raw)

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



view thread (7+ messages)  latest in thread

Message-ID: <20011012015510.73010.qmail@web14402.mail.yahoo.com>
Permalink:  ../20011012015510.73010.qmail@web14402.mail.yahoo.com/
Also on:    postgresql.org/message-id/20011012015510.73010.qmail@web14402.mail.yahoo.com

 · 

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: zsheran@yahoo.com
  Subject: Re: Nextval
  In-Reply-To: <20011012015510.73010.qmail@web14402.mail.yahoo.com>
  References: <20011012015510.73010.qmail@web14402.mail.yahoo.com>

* 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