<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:ZSQLBrain
class_file:zsqlbrain.py
</dtml-comment>
<params>uid
sort_on</params>
SELECT
	item.uid, item.Id, item.path, item.Description
FROM
	catalog AS item, category
WHERE
	category.uid = <dtml-sqlvar uid type="int">
AND
	category.category_uid = item.uid
AND
	category.base_category_uid = <dtml-var "portal_categories.aggregate.uid">

<dtml-if sort_on>ORDER BY
	<dtml-var sort_on>
</dtml-if>