get id for subcategory from db