An Error Was Encountered
Error Number: 1033
Incorrect information in file: './ziplocal/companies.frm'
SELECT cat.name_en as primary_category, c.name, if(c.hide_address=1,'',c.display_address) AS address, if(c.hide_address=1,'',ci.name) AS city, if(c.hide_address=1,'',p.abbreviation) AS province, if(c.hide_address=1,'',c.province_id) AS province_id ,if(c.hide_address=1,'',c.city_id) AS city_id, if(c.hide_address=1,'',c.postal_code) as postal_code , if(c.hide_phone=1,'',c.phone) as phone, if(c.hide_toll_free=1,'',c.toll_free) as toll_free, if(c.hide_fax=1,'',c.fax) as fax ,if(c.hide_email=1,'',c.email) as email ,c.lat,c.long, c.total_monthly, (select sum(best_pick_selections_count) from best_pick_companies b where b.company_id=c.id group by b.company_id) as best_pick_selections_count,r.number_of_reviews FROM companies c LEFT JOIN categories cat ON cat.id=c.primary_category LEFT JOIN cities ci ON ci.id=c.city_id LEFT JOIN provinces p ON p.id=c.province_id LEFT OUTER JOIN reviews_summary_table r ON r.company_id = 1003101 WHERE c.id = 1003101 and (address_status='1' or address_status='3')