<dtml-comment>
title:Search Category
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:ZSQLBrain
class_file:zsqlbrain.py
</dtml-comment>
<params>category_list
portal_type</params>
<dtml-if portal_type>
SELECT DISTINCT catalog.uid, catalog.path, catalog.relative_url, portal_type
FROM catalog, category
WHERE (<dtml-in portal_type><dtml-unless sequence-start> OR </dtml-unless>catalog.portal_type='<dtml-var sequence-item>'</dtml-in>)
AND catalog.uid = category.uid
AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)
<dtml-else>
SELECT DISTINCT catalog.uid, catalog.path, portal_type
FROM catalog, category
WHERE catalog.uid = category.uid
AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)
</dtml-if>

