From: | Daniel Hertz <danielhertz(at)shaw(dot)ca> |
---|---|
To: | "postgreSQL (General)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Multi-row update w. plpgsql function |
Date: | 2005-12-15 00:29:00 |
Message-ID: | 43A0B8CC.5050005@shaw.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)shaw(dot)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 graphic designer with little coding skill.
Thanks again.
Daniel
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2005-12-15 00:50:27 | Re: Question on the use of bracket expressions in Postgres |
Previous Message | Siddharth Rath -X (sirath - Keane, Inc. at Cisco) | 2005-12-15 00:13:54 | unsubscribe pgsql-genera |