Need to select and update with the same sql statement

Поиск
Список
Период
Сортировка
От David Busby
Тема Need to select and update with the same sql statement
Дата
Msg-id 026501c28b4a$fe1a1c40$4000000a@busbydev
обсуждение исходный текст
Ответы Re: Need to select and update with the same sql statement  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-php
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


В списке pgsql-php по дате отправления:

Предыдущее
От: "Fernando Papa"
Дата:
Сообщение: Retriving cursor from pgplsql function
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Need to select and update with the same sql statement