[Zope] Z SQL Methods

Casey Duncan casey at zope.com
Tue Jan 6 15:25:22 EST 2004


On Tue, 6 Jan 2004 13:55:07 -0500 (EST)
Asad Habib <ahabib at 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



More information about the Zope mailing list