[Zope-DB] ZSQL Question - Insert multiple rows in one statement?

Jaroslav Lukesh lukesh at seznam.cz
Tue Aug 24 18:04:51 EDT 2010

----- Puvodní zpráva ----- 
Od: "Andreas Jung" <lists at zopyx.com>

> Hash: SHA1
> I would assume that you can use DTML-IN for looping and generating
> multiple SQL statements of the same kind. You have to ensure that
> the statements having a proper delimiter (there was something in DTML?!
> DTML-SQLDELIMITER?...no idea, you need to checks the docs of this
> ancient technology).

DTML is mature, not ancient. For ZSQL is DTML the best one. For HTML, css, 
javascripts too. Only for large XML trees the ZPT should be better.

Did you try to make many small dynamic javascript in one page with ZPT? 
Yeah, python scripts calling, instead of placing small dtml code into 
javascript in page...

ZPT is more academic platform, than for everyday usage.

> Mark Phillips wrote:
>> When I retrieve multiple values from a selection box, I need to create a
>> loop somewhere to insert the multiple values (rows) into a table. Is
>> there a way to do this within a ZSQL statement, or is it best to do the
>> looping in a Python script?

use this:

<dtml-var sql_delimiter>
<dtml-var sql_delimiter>

More information about the Zope-DB mailing list