|
select distinct a.cat_id, a.cat_name from mb_category a, mb_topic b where a.cat_active='Active' and a.cat_id=b.cat_id and b.topic_active='Active' and (b.as_id='687' or b.as_id in (6,7,48,62,64,86,185,225,312,318,325,368,445,499,551,556,570,622,636,676,691,692,693,710,201,733,734,) or 687=10) group by a.cat_id |