[Zope] Zope + sql

Herring, William O. HerringW@missouri.edu
Sat, 14 Apr 2001 08:45:54 -0500


I hope someone has an example or suggestion.

Using Znolk, I SELECT from a table and the list is viewed.  However, I would
like to choose certain records (mark them  from the viewed list) and then
change a variable of only the marked records to a single new value.  The new
and old variable values are finite, they could come from a pull down list.

So the idea would be to show the  list from SELECT, but have an pull-down
menu of new values at the top of the page that should be replaced for the
variable to edit.  The user would choose the new value from the pull-down
and then go down the page and mark each record for which that value would be
UPDATEed in the table

Once this is done the values would be passed back to sql and UPDATE used to
replace the old values.  I'm not quite sure how to do this either.  Do you
have a loop, where inside the loop the UPDATE is goes through each marked
record, or do you loop inside the 

UPDATE tablename set 
    variable=newvalue
   where ----loop here with or's------

Any suggestions or similar examples would be appreciated.