[Zope] How can run multiple query in an Z sql method

Tino Wildenhain tino at wildenhain.de
Fri Mar 9 05:35:55 EST 2007


Andreas Jung schrieb:
> 
> 
> --On 9. März 2007 14:42:57 +0530 Remil Mathew <remil.dm at gmail.com> wrote:
> 
>> Hi,
>> How can run  multiple query in an Z sql method..
> 
> Sure. SQL Statement just have to separated by <dtml-sql-delimiter>.
> 
> I am using Mysql..
>> Also is there any method to return a value from insert query?
> 
> An insert statement does not return a value! If you are working
> with sequences for generating the primary  key you might perform
> a select on the current value of the related sequence.

Well, it can. See RETURNING clause:
http://www.postgresql.org/docs/8.2/static/sql-insert.html

but I doubt mysql supports this ... checking ... no, it doesnt.

Regards
Tino


More information about the Zope mailing list