[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Nesting queries
Is it possible to nest [query] tags? I have one [query] that lists top level
categories and would like to list the selected subcategories with the main
category using another [query].
[query list=1 st=db sql="select * from categories where
parent=null"]
... display main cat ...
[if sql-code = [data session arg]]
[then]
[query list=1 st=db sql="select * from categories where
parent='[data session arg]'"]
... display sub-cat ...
[/query]
[/then]
[/if]
[/query]
Thanks,
Peter