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 <[EMAIL PROTECTED]> 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
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend