Re: ZSQL Question - Insert multiple rows in one statement?

"Jaroslav Lukesh" <[email protected]> Wed, 25 Aug 2010 00:04:51 +0200
Newsgroups gmane.comp.web.zope.database
Message-ID <011001cb43d8$60afc500$6164a8c0@IBMXP>
----- Puvodn=ED zpr=E1va ----- =

Od: "Andreas Jung" <[email protected]>


> -----BEGIN PGP SIGNED MESSAGE-----
> 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:

query1
<dtml-var sql_delimiter>
query2
<dtml-var sql_delimiter>
query3