<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>select_columns
sort_on
Description
id
Title</params>
<dtml-if sort_on>
SELECT DISTINCT <dtml-var select_columns> FROM catalog as catalog, catalog as phone, roles_and_users WHERE catalog.uid=phone.parent_uid AND catalog.uid=roles_and_users.uid AND catalog.portal_type='Person' ORDER BY <dtml-var sort_on>
<dtml-else>
SELECT DISTINCT <dtml-var select_columns> FROM catalog as catalog, catalog as phone, roles_and_users WHERE catalog.uid=phone.parent_uid AND catalog.uid=roles_and_users.uid AND catalog.portal_type='Person'
</dtml-if>
