pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Busby <busby@pnts.com>
To: pgsql-php@postgresql.org
Subject: Need to select and update with the same sql statement
Date: Wed, 13 Nov 2002 11:29:32 -0800
Message-ID: <026501c28b4a$fe1a1c40$4000000a@busbydev> (raw)

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




view thread (7+ messages)  latest in thread

Message-ID: <026501c28b4a$fe1a1c40$4000000a@busbydev>
Permalink:  ../026501c28b4a$fe1a1c40$4000000a@busbydev/
Also on:    postgresql.org/message-id/026501c28b4a$fe1a1c40$4000000a@busbydev

 · 

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: busby@pnts.com
  Subject: Re: Need to select and update with the same sql statement
  In-Reply-To: <026501c28b4a$fe1a1c40$4000000a@busbydev>
  References: <026501c28b4a$fe1a1c40$4000000a@busbydev>

* 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