[Zope] ANN: Tutorial for Zope Page Templates
Evan Simpson
evan@digicool.com
Fri, 22 Jun 2001 16:33:21 -0400
Jim Penny wrote:
> It would be really useful to have an example of using a very simple
> ZSQL method.
>
> Say your underlying database people was name:text, user:int
>
> and you had ZSQL method sql_select (no parameters) select * from
> people order by age
<table>
<tr><th>Name</th><th>Age</th></tr>
<tr tal:repeat="person here/sql_select">
<td tal:content="person/name">Fred</td>
<td tal:content="person/age">21</td>
</tr>
</table>
> Also can you trigger sideffects from TAL? For example, can you
> trigger the usual CRUD statements?
I'm not sure what you mean. You can call anything you like from an
expression, and if it has side-effects, they'll trigger.
Cheers,
Evan @ digicool