Most Recent Customer Feedback

There is an error on the SQL command.

SQL:
select p.*, t.town, c.county, count(rw.rev_id) as num_reviews, count(*) as a from geo_towns t, geo_counties c, geo_regions r, pubs p left join assoc_pub_offer po on po.pof_pub = p.pub_id left join assoc_pub_facilities pf on pf.pfc_pub = p.pub_id left join pubs_gallery pg on pg.gal_pub = p.pub_id left join reviews rw on rw.rev_pub = p.pub_id where p.pub_town = t.id and t.county_id = c.id and c.region_id = r.id and pub_online = 1 and pub_active = 1 group by p.pub_id order by

Error:
Too many connections