[Zope-DB] multiple table updates

garry saddington garry@joydiv.fsnet.co.uk
Wed, 19 Mar 2003 18:15:55 +0000

> I have a form which retrieves data from a database table and displays i=
> for the user to amend. Many records are able to be changed and i would =
> like to be able to update all these records in the table. I can not fin=
d a
> way to do this as yet. Can anyone help?
> regards
> garry saddington
I probably need to qualify this. The form when submitted returns a series=
value pairs. Each pair needs to be used to update an individual record.=20
Therefore it seems to me that some way of iterating over each pair is nee=
and then the ZSQL update query can be fired off for each one:

update tbldet set completed=3D<dtml-sqlvar comp type=3D"string">
where detid=3D<dtml-sqlvar detid type=3D"int">