[Zope-DB] Dynamically generate sql-query in ZSQL Method

Ian Bicking ianb at colorstudy.com
Tue Apr 6 15:58:58 EDT 2004

hawelek_tlen wrote:
> Hi,
> I'm beginner in Zope,
> I want to generate dynamically sql-query in ZSQL Method,
> exactly i want to give whole sql-query like parameter to ZSQL Method for 
> example in DTML Method,

I think you want a Z SQL method (we'll call it raw_sql) with a body like:

<dtml-var sql>

Then you call raw_sql(sql='select * from person').  That's all there is 
to it!  (Of course if you use this, be cautious of SQL injection 
security holes)


More information about the Zope-DB mailing list