<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:750
max_cache:100
cache_time:0
class_name:ZSQLBrain
class_file:zsqlbrain.py
</dtml-comment>
<params>explanation_uid
node_uid
section_uid
variation_text
resource_uid</params>
SELECT
	catalog.*
FROM
	catalog, movement, category, stock
WHERE
	movement.uid = category.uid
AND	category.category_uid = catalog.uid
AND	category.base_category_uid = <dtml-var "portal_categories.aggregate.getUid()">
AND	stock.uid = movement.uid
AND	movement.is_accountable = 1
AND	movement.resource_uid = <dtml-sqlvar resource_uid type="int">
AND	movement.delivery_uid = <dtml-sqlvar explanation_uid type="int">
AND	movement.variation_text = <dtml-sqlvar variation_text type="string">
AND	stock.node_uid = <dtml-sqlvar node_uid type="int">
AND	stock.section_uid = <dtml-sqlvar section_uid type="int">
