[Zope] ZSQL result passing

Dieter Maurer dieter at handshake.de
Wed Mar 9 13:28:30 EST 2005


burley at zonnet.nl wrote at 2005-3-9 13:26 +0100:
> ...
>I'd hoped that in:
><dtml-let members=my_zsql_members_call>
>
>   <dtml-in my_zsql_iterator_call prefix="seq">
>        <dtml-var my_python_call(item=seq_item,members=members)>
>  </dtml-in>
>
></dtml-let>
>
>the my_zsql_members_call would return a *list* of multiple rows (or kind
>ofsequence object) of members information data to be used thereafter in the
><dtml-in> iteration. Obviously, this is not the case. 

It should indeed.

However, the code above calls your Z SQL Method twice (a waste of time!).
Use "<dtml-in members ...>" instead (this has nothing to do with
your problem, it is just a sidenote).

>Technically, my problem can simply be restated as follows: how do I retrieve a
>multiple row ZSQL result and bind it to a single variable so that it can be
>passed to and iterated upon in a Python script?

The code above should do this.

What (precise!) kind of problem you observe (error type, error value
and traceback!)

-- 
Dieter


More information about the Zope mailing list