[Zope] Bulk insert in Zope's ZPyGres

Paul Chung Chee Soong HCSCCS@prudential.com.my
Thu, 22 Jul 1999 10:37:34


Thanks. But how do use insert statements thru Z SQL Mtehod submitting it   
again? We will need to submit the web page a lot of times to get the   
variables across, wouldn't we? How do we address this problem ?

Again, please reply to my personal mail also.


 ----------
From:  "Phillip J. Eby"
Sent:  Wednesday, July 21, 1999 9:00 AM
To:  Paul Chung Chee Soong; zope
Subject:  Re: [Zope] Bulk insert in Zope's ZPyGresql

Content-Type: text/plain; charset="us-ascii"
X-Loop-Detect: 1


At 09:18 AM 7/21/99, Paul Chung Chee Soong wrote:
>Hi. I'm beeen using Zope-1.10.3-src, Zap-1.10, RedHat 5.2 and lately
>ZPyGresql Database Adaptor. Okay, the problem is can I do the aboved.   
For
>instance, I put a few checkboxes (the amount is dynamic) on the page.
>Then the user will click on the items they want to borrow and press the   
    

>submit button. After that, the next page will insert all this entries
>into records in a postgres table.
>

Just make the checkbox field a :list field, and have your SQL method do   
an
<!--#in--> block that loops over it to create a series of INSERT   
statements
in one batch.