[ZPT] Fwd: Re: sql not that persistent
Fri, 26 Jul 2002 21:07:51 +0200
Michal Kurowski writes:
> sql method iterated on five tables ( some scripts involved etc)
> zpt: tal:repeat on each of the tables
> zpt: tal:repeat on rows from those tables
> zpt: link to a script
> script: performing an action on fields from that second iteration
> and trying to access values from the first iteration
> As I said: I can access the values (from the "second iteration")
> directly through parameters but I still have to do some sql
> in the script later on.
Z SQL results live as long as they are referenced.
They disappear at least when the request is finished.
You can bind them to names:
<dtml-let my_result=sql_result>...</dtml-let> (DTML)
<... tal:define="[global] my_result here/sql_result">... (ZPT)
or put them into the request object
"REQUEST.set('my_result', sql_result())" (DTML, similar for ZPT).
You can pass them via "REQUEST" or explicit parameters or
(for DTML callees) the namespace into called scripts.