SELECT DISTINCT catalog.* FROM catalog, category, roles_and_users WHERE catalog.uid=category.uid AND catalog.uid=roles_and_users.uid AND <dtml-varquery> AND <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int> ORDER BY <dtml-varsort_on>\n
<dtml-else>\n
SELECT * FROM catalog WHERE <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int> ORDER BY <dtml-varsort_on>\n
</dtml-if>\n
<dtml-else>\n
<dtml-ifquery>\n
SELECT DISTINCT catalog.* FROM catalog, category, roles_and_users WHERE <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int> AND catalog.uid=category.uid AND catalog.uid=roles_and_users.uid AND <dtml-varquery>\n
<dtml-else>\n
SELECT * FROM catalog WHERE <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int>\n
SELECT DISTINCT catalog.* FROM catalog, category, roles_and_users WHERE catalog.uid=category.uid AND catalog.uid=roles_and_users.uid AND <dtml-varquery> AND <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int> ORDER BY <dtml-varsort_on>\n
<dtml-else>\n
SELECT * FROM catalog WHERE <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int> ORDER BY <dtml-varsort_on>\n
</dtml-if>\n
<dtml-else>\n
<dtml-ifquery>\n
SELECT DISTINCT catalog.* FROM catalog, category, roles_and_users WHERE <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int> AND catalog.uid=category.uid AND catalog.uid=roles_and_users.uid AND <dtml-varquery>\n
<dtml-else>\n
SELECT * FROM catalog WHERE <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int>\n
</dtml-if>\n
</dtml-if>
]]></string></value>
</item>
<item>
<key><string>template</string></key>
<value>
<object>
<klass>
<globalname="SQL"module="Shared.DC.ZRDB.DA"/>
</klass>
<none/>
<state>
<dictionary>
<item>
<key><string>__name__</string></key>
<value><stringencoding="cdata"><![CDATA[
<string>
]]></string></value>
</item>
<item>
<key><string>_vars</string></key>
<value>
<dictionary/>
</value>
</item>
<item>
<key><string>globals</string></key>
<value>
<dictionary/>
</value>
</item>
<item>
<key><string>raw</string></key>
<value><stringencoding="cdata"><![CDATA[
<dtml-if sort_on>\n
<dtml-ifquery>\n
SELECT DISTINCT catalog.* FROM catalog, category, roles_and_users WHERE catalog.uid=category.uid AND catalog.uid=roles_and_users.uid AND <dtml-varquery> AND <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int> ORDER BY <dtml-varsort_on>\n
<dtml-else>\n
SELECT * FROM catalog WHERE <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int> ORDER BY <dtml-varsort_on>\n
</dtml-if>\n
<dtml-else>\n
<dtml-ifquery>\n
SELECT DISTINCT catalog.* FROM catalog, category, roles_and_users WHERE <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int> AND catalog.uid=category.uid AND catalog.uid=roles_and_users.uid AND <dtml-varquery>\n
<dtml-else>\n
SELECT * FROM catalog WHERE <dtml-sqltestparent_uidop=eqcolumn=catalog.parent_uidtype=int>\n