[Zope] ZSQL Method Question

Hannu Krosing hannu@tm.ee
Fri, 25 Feb 2000 00:28:24 +0200


"Carlson, Christopher W." wrote:
> 
> This wasn't originally my line of questioning, but it inspired me...and I
> subsequently became stuck.
> 
> I've done the following:
> <dtml-call "REQUEST.set('rows',MaintNames())">
> and successfully set 'rows' to the value returned by the SQL Method
> MaintNames.  I can <dtml-in rows> through the list and do fun stuff.
> 
> After scouring the documentation, I still can't find how to select the
> values from an arbitrary row, say row 3 without combining <dtml-in> and
> <dtml-if> while using the sequence-item value.  Is there a more elegant way?
> 
>

You could try the python "slice" operator, ie. to get the third row, use

<dtml-in "row[2:3]">

this gets a one-row sequence of third row only out of rows.

----------

Hannu