[Zope] Problem with nested Z SQL Methods

Krone, Armin armin.krone@telecash.de
Thu, 25 Oct 2001 18:00:13 +0200


I try to do two nested Database requests. In the outer lop there is selected
all the merchants transactions and in the inner loop there shall be
displayed the possible (0..n) Results. The TID shall be taken from from the
outer loop.
This fails with an syntax error. If I set in '<dtml-in
expr="Database.sqlGetResults(tid='123')" >' instead it works (but the inner
loop gets the wrong data - for shure).

How can i nest this 2 Z SLQ Methods correct?


<dtml-var standard_html_header>
<h2><dtml-var title_or_id> <dtml-var document_title></h2>
<p>
<table border=1>
 <tr>
  <th>TID</th>
  <th>CURRENCY</th>
  <th>AMOUNT</th>
  <th>AMOUNTWITHOUTDECIMALS</th>
  <th>BASKET</th>
  <th>CARDNUMBER</th>
  <th>CARDEXPIRY</th>
  <th>USERID</th>
  <th>PAYMETHOD</th>
  <th>MERCHANTTID</th>
  <th>MERCHANTADDITIONALDATA</th>

 </tr>
 <dtml-in
expr="Database.sqlGetTransactionMerchant(merchantid=_.SecurityGetUser().getU
serName())" >
 <tr>
  <td><dtml-var TID></td>
  <td><dtml-var CURRENCY ></td>
  <td><dtml-var AMOUNT ></td>
  <td><dtml-var AMOUNTWITHOUTDECIMALS ></td>
  <td><dtml-var BASKET ></td>
  <td><dtml-var CARDNUMBER ></td>
  <td><dtml-var CARDEXPIRY ></td>
  <td><dtml-var USERID ></td>
  <td><dtml-var PAYMETHOD ></td>
  <td><dtml-var MERCHANTTID ></td>
  <td><dtml-var MERCHANTADDITIONALDATA ></td>

 </tr>
   <dtml-in expr="Database.sqlGetResults(tid=<dtml-var TID>)" > 
   ########################################################### failes
 (...)
  
   </dtml-in>

 </dtml-in>
</table>
</p>
<dtml-var standard_html_footer>

regards
Armin Krone