select column_type, field_identifier, field_name
from ec_custom_product_fields
where column_type in ('date','integer')
and active_p='t'
select dirname from ec_products where product_id=:product_id
select user_class_id, user_class_name from ec_user_classes order by user_class_name
select field_identifier, field_name, column_type
from ec_custom_product_fields
where active_p = 't'
select template_name from ec_templates where template_id=:template_id
select field_identifier from ec_custom_product_fields where active_p='t'
select user_class_id from ec_user_classes