[Zope] SQL METHODS - Obtaining ROW IDS in an <IN> STATEMENT
Hannu Krosing
hannu@trust.ee
Thu, 05 Aug 1999 17:08:33 +0300
Theodore Patrick wrote:
>
> Here is the situation:
>
> I have a method called item_method. It contains SQL:SELECT that returns 10
> rows of data. When I want to print this to a page in ZOPE. I use an <IN>
> Statement as follows. Currently the data set from the database does not
> return a row number, so I need Zope to make one up as it prints the HTML.
> The data set has two columns called this and that. I need the code that
> generates the <!--#var ?????? --> in the following code.
>
> <!--#in item_method size=10 start=query_start-->
> ROW_NUM= <!--#var ?????? --> THIS=<!--#var this -->, THAT=<!--#var
> that -->
> <!--#in -->
use <!--#var sequence-index-->
for example:
<!--#in "[0,0,0,0,0,0]"-->
Row nr (0-based): <!--#var sequence-index-->,
Row nr (1-based): <!--#var "_['sequence-index']+1"-->
<br>
<!--#/in -->
--------------------
Hannu