[Zope] Looking up other row records in an SQLMethod?

Theodore Patrick tpatrick@IndigoNetworks.com
Tue, 15 Aug 2000 09:03:53 -0500


Is it possible to look up other SQL record values while iterating through a
<DTML-IN>?

Sample Data returned by SQL Method:

ID, ORDER
23, 1 
25, 3
34, 6
39, 19
12, 23

Using a <DTML IN> I need to get the following during a single pass through
the SqlMethod:

HEADER >>    ID   ORDER  PREV  NEXT
PASS 1   >>    23        1        null        3
PASS 2   >>    25        3          1         6
PASS 2   >>    25        6          3        19
PASS 2   >>    25       19         6        23
PASS 2   >>    25       23        19       null

Calculating the PREV and NEXT is the problem and this cannot be done via
SQL.

1. What is the syntax for writing out SQL Fields Directly?

Say in a <DTML-IN>

<dtml-var ID>  <dtml-var ORDER> <dtml-var "ORDER[0]"> <dtml-var "ORDER[2]


Any Ideas??

Thanks in Advance.

Theodore E. Patrick
Ishophere.com