[Zope-DB] ZPTs and database accesses

Jaroslav Lukesh lukesh at seznam.cz
Thu May 19 04:49:22 EDT 2005


Dne čtvrtek, 28. dubna 2005 20:17 Andreas Jung <lists at andreas-jung.com> 
napsal(a):
> You have not read the book correctly. First statement just said that you
> can't SQL queries using ZPT. In Zope you specify SQL queries using
> *ZSQL methods* that use DTML as markup language...this is not the same
> as defining SQL inside DTML methods/documents or Page Templates.

with discuss about security it is possible to query sql directly from dtml/zpt 
with yourZSQLmethod like this:

<param>
sqlquery:string
</params>
<dtml-var sqlquery>

and corresponding dtml method:

<dtml-call "REQUEST.set('sqlquery','select * from table')">
<dtml-in yourZSQLmethod>
...
</dtml-in>

-- 

                        Jaroslav Lukesh
  -----------------------------------------------------------
  This e-mail can not contain any viruses because I use Linux



More information about the Zope-DB mailing list