Hello. Does anyone know if you can have multiple queries within a single Z SQL method? Thanks. - Asad
No. -aj --On Dienstag, 6. Januar 2004 13:55 Uhr -0500 Asad Habib <ahabib@engin.umich.edu> wrote:
Hello. Does anyone know if you can have multiple queries within a single Z SQL method? Thanks.
- Asad
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
"No" applied to the assumption that you are doing performing SELECTS. -aj --On Dienstag, 6. Januar 2004 20:01 Uhr +0100 Andreas Jung <andreas@andreas-jung.com> wrote:
No.
-aj
--On Dienstag, 6. Januar 2004 13:55 Uhr -0500 Asad Habib <ahabib@engin.umich.edu> wrote:
Hello. Does anyone know if you can have multiple queries within a single Z SQL method? Thanks.
- Asad
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Tue, 6 Jan 2004 13:55:07 -0500 (EST) Asad Habib <ahabib@engin.umich.edu> wrote:
Hello. Does anyone know if you can have multiple queries within a single Z SQL method? Thanks.
- Asad
Yes, so long as they do not return records. just put <dtml-var sql_delimiter> lines between them. i.e.: UPDATE foo SET BAR=NULL <dtml-var sql_delimiter> UPDATE baz SET splat=NULL This allows you to perform multiple inserts/updates/deletes in a single database transaction for instance. hth, -Casey
Hi, Casey Duncan wrote:
On Tue, 6 Jan 2004 13:55:07 -0500 (EST) Asad Habib <ahabib@engin.umich.edu> wrote:
Hello. Does anyone know if you can have multiple queries within a single Z SQL method? Thanks.
- Asad
Yes, so long as they do not return records. just put <dtml-var sql_delimiter> lines between them. i.e.:
UPDATE foo SET BAR=NULL
<dtml-var sql_delimiter>
UPDATE baz SET splat=NULL
This allows you to perform multiple inserts/updates/deletes in a single database transaction for instance.
; should be equivalent to sql_delimiter I think. May be it depends on the actual database. If database supports transactions, it should make no difference if all statements are in one ZSQL method or actually in different distinct and subsequently called ones :-) Regards Tino Wildenhain
participants (4)
-
Andreas Jung -
Asad Habib -
Casey Duncan -
Tino Wildenhain