[Zope] Bulk insert in Zope's ZPyGresql

Phillip J. Eby pje@telecommunity.com
Wed, 21 Jul 1999 09:00:00 -0500


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.