select cat from directory where is_archived=0 and site_url != '' and (city='bakerstown' OR city='bakerstown') and (state='PA' OR state='Pennsylvania')
select cat from directory where is_archived=0 and site_url != '' and (city='bakerstown' OR city='bakerstown') and (state='PA' OR state='Pennsylvania')
union
select cat from affiliate_directory where is_archived=0 and site_url != '' and (FIND_IN_SET('bakerstown', city) OR city='all' ) and (state='PA' OR state='Pennsylvania' OR state='all')
791,227,867,56,1
select id,category_name,cat_img,catslug from directory_category where is_archived=0 and category_type='1' and id IN (56,75,168,867,80,227,197,1) ORDER BY `catorder` ASC Limit 0,2
(select id,site_url,local_address,com_name, COUNT(site_url) as com_num from directory
where is_archived=0 and site_url != '' and (city='cape charles' OR city='cape_charles') and (state='VA' OR state='Virginia') and cat='197' and sub_cat='201' and (sub_sub IS NULL OR sub_sub=0 )
Group by site_url order by com_name asc limit 0,100)
union
(select id,site_url,local_address,affiliate_name as com_name, COUNT(site_url) as com_num from affiliate_directory
where is_archived=0 and site_url != '' and (FIND_IN_SET('cape_charles', city) OR city='all' ) and (state='VA' OR state='Virginia' OR state='all') and cat='197' and sub_cat='201' and (sub_sub IS NULL OR sub_sub=0 )
GROUP BY site_url order by com_name asc)
(select id,site_url,local_address,com_name, COUNT(site_url) as com_num from directory
where is_archived=0 and site_url != '' and (city='cape charles' OR city='cape_charles') and (state='VA' OR state='Virginia') and cat='197' and sub_cat='1259' and (sub_sub IS NULL OR sub_sub=0 )
Group by site_url order by com_name asc limit 0,100)
union
(select id,site_url,local_address,affiliate_name as com_name, COUNT(site_url) as com_num from affiliate_directory
where is_archived=0 and site_url != '' and (FIND_IN_SET('cape_charles', city) OR city='all' ) and (state='VA' OR state='Virginia' OR state='all') and cat='197' and sub_cat='1259' and (sub_sub IS NULL OR sub_sub=0 )
GROUP BY site_url order by com_name asc)
(select id,site_url,local_address,com_name, COUNT(site_url) as com_num from directory
where is_archived=0 and site_url != '' and (city='cape charles' OR city='cape_charles') and (state='VA' OR state='Virginia') and cat='227' and sub_cat='256' and (sub_sub IS NULL OR sub_sub=0 )
Group by site_url order by com_name asc limit 0,100)
union
(select id,site_url,local_address,affiliate_name as com_name, COUNT(site_url) as com_num from affiliate_directory
where is_archived=0 and site_url != '' and (FIND_IN_SET('cape_charles', city) OR city='all' ) and (state='VA' OR state='Virginia' OR state='all') and cat='227' and sub_cat='256' and (sub_sub IS NULL OR sub_sub=0 )
GROUP BY site_url order by com_name asc)
(select id,site_url,local_address,com_name, COUNT(site_url) as com_num from directory
where is_archived=0 and site_url != '' and (city='cape charles' OR city='cape_charles') and (state='VA' OR state='Virginia') and cat='227' and sub_cat='354' and (sub_sub IS NULL OR sub_sub=0 )
Group by site_url order by com_name asc limit 0,100)
union
(select id,site_url,local_address,affiliate_name as com_name, COUNT(site_url) as com_num from affiliate_directory
where is_archived=0 and site_url != '' and (FIND_IN_SET('cape_charles', city) OR city='all' ) and (state='VA' OR state='Virginia' OR state='all') and cat='227' and sub_cat='354' and (sub_sub IS NULL OR sub_sub=0 )
GROUP BY site_url order by com_name asc)
(select id,site_url,local_address,com_name, COUNT(site_url) as com_num from directory
where is_archived=0 and site_url != '' and (city='cape charles' OR city='cape_charles') and (state='VA' OR state='Virginia') and cat='227' and sub_cat='245' and (sub_sub IS NULL OR sub_sub=0 )
Group by site_url order by com_name asc limit 0,100)
union
(select id,site_url,local_address,affiliate_name as com_name, COUNT(site_url) as com_num from affiliate_directory
where is_archived=0 and site_url != '' and (FIND_IN_SET('cape_charles', city) OR city='all' ) and (state='VA' OR state='Virginia' OR state='all') and cat='227' and sub_cat='245' and (sub_sub IS NULL OR sub_sub=0 )
GROUP BY site_url order by com_name asc)