Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1AE014761B8 for ; Wed, 13 Nov 2002 14:33:08 -0500 (EST) Received: from seapdc01.PNTS (ip63.c216.blk1.bel.nwlink.com [209.20.216.63]) by postgresql.org (Postfix) with ESMTP id 7247C475FDA for ; Wed, 13 Nov 2002 14:33:07 -0500 (EST) Received: from busbydev (BUSBY-DEV [10.0.0.64]) by seapdc01.PNTS with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id VLKPFTGS; Wed, 13 Nov 2002 11:38:25 -0800 Message-ID: <026501c28b4a$fe1a1c40$4000000a@busbydev> From: "David Busby" To: Subject: Need to select and update with the same sql statement Date: Wed, 13 Nov 2002 11:29:32 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/56 X-Sequence-Number: 1638 List, I need to do a command like: select * from "table" where "id"=54; update "table" set "col"=value where "id"=just selected id Is that possible? How would I work that into a StoredProcedure? I'm getting a race condition where two+ clients are asking for data but getting the same record, (each record is a datachunk for a distributed client). This results in each client working on the same data, not good. Any ideas? I'm posting to the php/sql list cause the clients ask for the datachunk via SOAP request that is processed via PHP. Any assistance would be great /B