Received: from web14402.mail.yahoo.com (web14402.mail.yahoo.com [216.136.174.59]) by postgresql.org (8.11.3/8.11.4) with SMTP id f9C1tEn95606 for ; Thu, 11 Oct 2001 21:55:14 -0400 (EDT) (envelope-from zsheran@yahoo.com) Message-ID: <20011012015510.73010.qmail@web14402.mail.yahoo.com> Received: from [196.40.43.219] by web14402.mail.yahoo.com via HTTP; Thu, 11 Oct 2001 18:55:10 PDT Date: Thu, 11 Oct 2001 18:55:10 -0700 (PDT) From: Zavier Sheran Subject: Nextval To: pgsql-php@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200110/46 X-Sequence-Number: 599 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