[Zope] SQL METHODS - Obtaining ROW IDS in an <IN> STATEMENT
Tony McDonald
tony.mcdonald@ncl.ac.uk
Thu, 5 Aug 1999 14:47:02 +0100
At 8:20 am -0500 5/8/99, 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 -->
>
Try <dtml-var sequence-index>,
ie ROW_NUM=<!--#var sequence-index--> THIS= etc etc.
hth
tone
------
Dr Tony McDonald, FMCC, Networked Learning Environments Project
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2