select site_wide_p from category_trees where tree_id = :tree_id select c.category_id as category_id from categories c, category_translations ct where parent_id is null and tree_id = :tree_id and c.category_id = ct.category_id and locale = :locale order by name update category_tree_map set assign_single_p = :assign_single_p, require_category_p = :require_category_p, widget = :widget where tree_id = :tree_id and object_id = :object_id select tree_id from category_tree_translations where name = :name and locale = :locale select object_id from acs_objects where title = :title and object_type = 'category_tree' select 1 from category_tree_translations where tree_id = :tree_id and locale = :locale select tree_id, subtree_category_id, assign_single_p, require_category_p, widget from category_tree_map where object_id = :object_id select distinct tree_id from category_object_map_tree where object_id = :object_id select tree_id, subtree_category_id, assign_single_p, require_category_p, widget from category_tree_map where object_id in ([join $object_id_list ", "]) select tree_id, category_id, left_ind, right_ind, case when deprecated_p = 'f' then '' else '1' end as deprecated_p from categories order by tree_id, left_ind select category_id, left_ind, right_ind, case when deprecated_p = 'f' then '' else '1' end as deprecated_p from categories where tree_id = :tree_id order by left_ind select tree_id, locale, name, description from category_tree_translations order by tree_id, locale select locale, name, description from category_tree_translations where tree_id = :tree_id order by locale