[Zope] Putting a <dtml-in> tag into a <dtml-in> tag

Jens Vagelpohl jens@digicool.com
Thu, 05 Apr 2001 09:09:50 -0400


gitte,

do yourself a big favor and use SQL to join the data... it will be cleaner
and faster. joins are done like this (your syntax depends on your database):

<untested>

select table1.column2, table1.column2, table2.column1
from table1, table2
where
table1.my_key_field = table2.my_key_field

</untested>

your own database will have documentation for this. it's called a "join"
operation.


jens



on 4/5/01 8:46, Gitte Wange at gitte@mmmanager.org wrote:

> On 05 Apr 2001 14:39:55 +0200, Paul Zwarts wrote:
>> Doesnt that depend on the tables? Zope doesnt support multiple selects in
>> one method. Regarding the question, can you use a Zsql method through a VAR
>> tag? It should look like this I think:
>> 
>> <dtml-in "sqlmethod1">
>>    <dtml-in "sqlmethod2(a=varfromsqlmethod1)">
> what do you mean here by a=varfromsqlmethod1?
> Should I putin here e.g. clipnum=clipid (clipid is the resulting
> variable from sqlmethod1) ?
>>       <dtml-var theResultfrom2>
>>    </dtml-in>
>> </dtml-in>
>> 
> 
> I get an error if I try to <dtml-var> anything from the result of sql
> method 2. But if I delete sqlmethod2 and tries to print out clipid from
> sqlmethod1, I don't get the error. If I can print out clipid, then it
> must also be possible to call sqlmethod2 with this variable ?
> 
> Regards,