select count(*) as cnt from shop_category_best_goods where is_open = 'Y' and pt_id = 'admin' and ca_id = '011027005' select * from (select * from shop_goods
where shop_state = '0'
and isopen = '1'
and (use_aff = '0')
and find_in_set('admin', use_hide) = '0'
and (ca_id like '011027005%' or ca_id2 like '011027005%' or ca_id3 like '011027005%' or ca_id4 like '011027005%' or ca_id5 like '011027005%') order by readcount desc limit 20) A order by rand() limit 10