Hi all How can one call SQL methods from ZPT ? The information on the site does not have any examples. TIA Chetan
Chetan Kumar writes:
How can one call SQL methods from ZPT ? Z SQL Methods are called like any other methods, scripts or functions.
They either get their parameters implicitly through REQUEST or explicitly through a series of keyword parameters. The easiest way is (implicit paramters) <... tal:repeat="rec here/SQLMethod" ..> A bit more difficult is explicit parameter passing: <... tal:repeat="rec python:here.SQLMethod(a1=val1, a2=val2,....)" ...> Dieter
Hello Chetan, Sunday, April 21, 2002, 20:39:56, you wrote: CK> Hi all CK> How can one call SQL methods from ZPT ? CK> The information on the site does not have any examples. CK> TIA CK> Chetan an example: <div tal:repeat="results here/myZSQLmethod"> <p tal:content="results/FIELDNAME"> FIELDNAME-things come here </p> </div> or the same when passing parameters : <div tal:repeat="results python:here.myZSQLmethod(param1 = foo , param2 = bar)"> <p tal:content="results/FIELDNAME"> FIELDNAME-things come here </p> </div> -- Geir Bækholt web-developer geirh@funcom.com funcom oslo | webdev-team
participants (3)
-
Chetan Kumar -
Dieter Maurer -
Geir Bækholt