select 1 from acs_object_types where object_type = :content_type select attribute_id from acs_attributes where object_type = :content_type and attribute_name = :a_name 1 = 1