[Zope-DB] Inserting into multiple tables

Andreas Jung andreas at andreas-jung.com
Wed May 5 01:06:24 EDT 2004

One ZSQL method can contain any number of insert or update statements in 
any table
but only *one* select statement.


--On Dienstag, 4. Mai 2004 17:24 Uhr -0700 Bryce Harrington 
<bryce at osdl.org> wrote:

> If I have a form that needs to insert into multiple tables on
> submission, how can this be done?
> Basically, I am creating an entry in a main table and then creating
> entries in several join tables.  During the insert into the main table a
> unique ID key is generated, and this key is used as an input to each of
> the other tables.
> The examples I've seen so far for ZSQL use only single insert statements
> into a single table.  Is it possible to do multiple inserts from one
> ZSQL operation?  If not, how would one do it with a Python script or
> other mechanism?
> Bryce
> _______________________________________________
> Zope-DB mailing list
> Zope-DB at zope.org
> http://mail.zope.org/mailman/listinfo/zope-db

More information about the Zope-DB mailing list