<dtml-comment>
title:
connection_id:MySQL
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_file:
</dtml-comment>
<params></params>
SELECT DISTINCT
	item.uid, item.id, item.path, 
        item.Description, item.simulation_state, item.default_destination_title,
	stock.uid as stock_uid,
	stock.node_uid as stock_node_uid,
	stock.quantity as stock_quantity

FROM
	catalog AS item

LEFT JOIN category, stock
ON (category.category_uid=item.uid
AND category.base_category_uid = <dtml-var "portal_categories.aggregate.getUid()">
AND stock.uid = category.uid)

WHERE item.portal_type = "Piece Tissu"

AND item.uid=1987190823