select Main_Category_ID from tbl_Main_Category where tbl_Main_Category.Approved = 1 and Main_Cat_ID = 317 order by Main_Category asc