Thanks Troy and thanks Phil too. It works like you said... The only problem is that I had to pass , besides the results of the query, the variables that I receive in the REQUEST. But it don´t represent a big problem for my particular case. Alejandro Pancani apancani@topgroup.com.ar ----- Original Message ----- From: "Farrell, Troy" <troy.farrell@wilcom.com> To: "'Alejandro Pancani'" <apancani@topgroup.com.ar>; <zope@zope.org> Sent: Tuesday, March 27, 2001 12:57 PM Subject: RE: [Zope] SQL results
Alejandro, If I remember correctly, ZSQL Methods only see variables from REQUEST and those explicitly passed to the method. With that in mind, try this:
<dtml-in name="select_sql_sentence"> <dtml-call expr="insert_sql_sentence(var1 = var1, var2 = var 2, . . .)"> </dtml-in>
And let us know.
Troy
-----Original Message----- From: Alejandro Pancani [mailto:apancani@topgroup.com.ar] Sent: Tuesday, March 27, 2001 9:44 AM To: zope@zope.org Subject: [Zope] SQL results
Is there any way to use the results of a query in other SQL sentence (like INSERT) without to have to redefine the variables in the REQUEST.
I tried this but didn´t work
<dtml-in select_sql_sentence> <dtml-call insert_sql_sentence> </dtml-in>
The only way that I found was that:
<dtml-in select_sql_sentence> <dtml-call "REQUEST.set('result_of_select', result_of_select)"> <dtml-call insert_sql_sentence> </dtml-in>
Of course the SELECT sentence returns only 1 match
Alejandro Pancani apancani@topgroup.com.ar
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )