Received: from pompom.freestart.hu (pompom.freestart.hu [213.197.64.6]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9C9Pgn09245 for ; Fri, 12 Oct 2001 05:25:42 -0400 (EDT) (envelope-from pgerzson@freestart.hu) Received: from erinyes.freestart.hu ([213.197.64.251]) by freestart.hu with esmtp (Freestart relay 1 (FS-Lin)) id 15ryQL-0002QT-00; Fri, 12 Oct 2001 11:16:09 +0200 Received: from line-71-177.dial.freestart.hu ([213.197.71.177] helo=jaguar) by erinyes.freestart.hu with smtp (Exim 3.32 #1 (Debian)) id 15ryht-0003Jt-00; Fri, 12 Oct 2001 11:34:17 +0200 Message-ID: <001b01c152ff$ffbd03c0$01fdfea9@jaguar> From: "Papp Gyozo" To: "Zavier Sheran" , References: <20011012015510.73010.qmail@web14402.mail.yahoo.com> Subject: Re: Nextval Date: Fri, 12 Oct 2001 11:26:39 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Scanner: exiscan by Freestart X-Archive-Number: 200110/48 X-Sequence-Number: 601 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" To: 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