select category_id from ec_categories where category_id=:category_id select count(*) from ec_categories where sort_key = :sort_key