Re: Multi-row update w. plpgsql function

Поиск
Список
Период
Сортировка
От Daniel Hertz
Тема Re: Multi-row update w. plpgsql function
Дата
Msg-id 43A0B8CC.5050005@shaw.ca
обсуждение исходный текст
Ответ на Re: Multi-row update w. plpgsql function  (Aaron Koning <aaronkoning@gmail.com>)
Список pgsql-general
Aaron Koning wrote:
> This might be easier to use this SQL:
>      UPDATE message_table SET status = 'A' WHERE mid IN (1,2,3);
>
> The following might work for Cocoon (never used it):
>      UPDATE message_table SET status = 'A' WHERE mid IN
> (<xsp-request:get-parameter name="approved"/>);
>
> Aaron
>
>
>
> On 12/13/05, Daniel Hertz <danielhertz@shaw.ca> wrote:
>
>> Given a set of checkbox values that are submitted through an html form,
>> how do you loop through the submitted values to update more than one row
>> in a table?
>>

You rock, Aaron! Thanks for helping this newbie out. Much more
economical than looping with my function.

The (<xsp-request:get-parameter name="approved"/>) isn't working, but
I'll try to see if I can use some xslt to parse the query string and
replace a variable ($approved_values) in:

UPDATE message_table SET status = 'A' WHERE mid IN ($approved_values);

If I new some javascript, I could probably do it client side, BEFORE it was sent to the server, but SIGH...I'm a
graphicdesigner with little coding skill. 

Thanks again.

Daniel



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

Предыдущее
От: "Siddharth Rath -X \(sirath - Keane, Inc. at Cisco\)"
Дата:
Сообщение: unsubscribe pgsql-genera
Следующее
От: Jerry LeVan
Дата:
Сообщение: Re: Installing the latest 8.1.1 rpms question.