[Zope] multiple records update

Dylan Reinhardt zope at dylanreinhardt.com
Tue Oct 14 14:24:03 EDT 2003


On Tue, 2003-10-14 at 11:02, Mike Doanh Tran wrote:
> Howdy,
> 
> I am trying to update multiple customers records on the same page.  I put 
> individual customer records into lists.  For example, I have four lists:
> 
> field1: ['a','b','c','d'}
> field2: ['a2','b2','c2','d2']
> field3: ['a3','b3','c3','d3']
> Cust_ID: ['1','2','3','4']
> 
> How do i break these list down so that i can pass it to a ZSQL method to 
> udpate this:
> 
> UPDATE customers SET
> field1=a,
> field2=a2,
> field3=a3,
> where  Cust_ID=1
> 
> Then interate until the end of each list where Cust_ID=4
> 
> Is this possible to do in DTML?  Thanks in advance for any suggestions,

<dtml-in Cust_ID prefix=cust>
   <dtml-call "REQUEST.set('cust_id_val', cust_item)">
   <dtml-call "REQUEST.set('field1_val', field1[cust_index])">
   etc, etc
</dtml-in>


HTH,

Dylan





More information about the Zope mailing list