[Zope] sorry for lame question...

Andreas Jung Andreas Jung <lists@andreas-jung.com>
Sun, 26 Jan 2003 20:27:08 +0100


--On Sonntag, 26. Januar 2003 11:18 -0800 Corey Saltiel 
<corey@axcelerant.com> wrote:

> On Sunday 26 January 2003 10:52 am, Andreas Jung wrote:
>> --On Sonntag, 26. Januar 2003 10:38 -0800 Corey Saltiel
>>
>> <corey@axcelerant.com> wrote:
> <snip>
>> > Using ZPT - how do I get the value returned from a ZSql method? This
>> > method only ever returns *one* value; I'd rather not do a tal:repeat if
>> > I'm able to.
>> >
> <snip>
>>
>> try something like
>>
>> <span tal:repeat="brain here/my_zsq_method">
>>
>
>   Thanks for the help!
>
>
>> ...
>> the brain variable does represent a single row of the
>> result of your SQL query. You should be able to access
>> the cols by "brain/<column_name>" where <column_name>
>> is the name of column returned by the query.
>>
>
>
>   'brain'?  Certainly not particularly intuitive...
>
>   How would I have gone about finding this info easily on my own, as a
> newbie?
>
>   The ZPT reference in the Zope book doesn't mention this anywhere...

This is not a ZPT issue but a ZSQL issue. Since tal:repeat just iterates
of a sequence (ZPT neither care about what this sequence contains nor
where is does come from) it is not described in the ZPT reference
but it should be part of the ZSQL method documentation.


-aj