A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= d.) AS num_tour_ops, (SELECT count(id) AS total_rows FROM tourop_list tl WHERE' at line 2
SELECT d.*, rc.*, c.*, LENGTH(CONCAT_WS(d.time, d.electricity, d.language, d.health, d.tipping, d.safety, d.business, d.communications, d.duty_free)) AS basics, LENGTH(CONCAT_WS(d.embassy_consulate_us, d.embassy_consulate_uk, d.embassy_consulate_ca, d.embassy_consulate_au, d.embassy_consulate_ir, d.embassy_consulate_nz)) AS contacts, (SELECT money FROM destinations WHERE country_code = "US" ) AS money, (SELECT LENGTH(CONCAT_WS(passport_visa, entry_req_us, entry_req_uk, entry_req_ca, entry_req_au, entry_req_ir, entry_req_nz)) FROM destinations WHERE country_code = "US" ) AS visa, (SELECT group_concat(id) FROM public_holiday p WHERE p.country_code = "US") AS public_holiday, (SELECT count(*) FROM tour_operators t where t. = d.) AS num_tour_ops, (SELECT count(id) AS total_rows FROM tourop_list tl WHERE tl.destinations LIKE ("%US%")) AS num_tour_operators, (SELECT group_concat(name) FROM port_of_call pc WHERE pc. = d.) AS ports_of_call, (SELECT group_concat(region_name) FROM regions_cities WHERE major_city = 1 AND = d. ORDER BY major_city DESC, region_name ASC) AS cities, (SELECT group_concat(region_name) FROM regions_cities WHERE major_city = 0 AND = d. ORDER BY major_city DESC, region_name ASC) AS regions, (SELECT group_concat(name) FROM resorts WHERE major_resort = 1 AND = d. ORDER BY major_resort DESC, name ASC) AS resorts, (SELECT count(*) FROM dmcs WHERE = d.) AS num_dmcs, (SELECT concat(caption, " © ", copyright) FROM images WHERE filename = rc.photo) AS photo_copyright, (SELECT count(*) FROM events e where e. = d.) AS num_events, (SELECT count(*) FROM activities where region_city_code = "0" AND = d.) AS num_activities, (SELECT count(*) FROM attractions a where a. = d. AND show_on_city = 1 AND excursion = "No") AS num_attractions, (SELECT count(*) FROM attractions a where a. = d. AND show_on_city = 1 AND show_on_kids = 1 AND excursion = "No") AS num_kids_attractions, (SELECT count(*) FROM attractions a where a. = d. AND excursion = "Yes") AS num_excursions, (SELECT count(*) FROM image_bridge ib LEFT OUTER JOIN images i ON ib.image_id=i.id WHERE ib.destination_code = c.country_code) AS num_photos, (SELECT count(*) FROM hospitals h where h.country_code = c.country_code) AS num_hospitals, (SELECT count(*) FROM phrase_book pb where pb.country_code = c.country_code) AS num_phrases FROM (destinations d) LEFT JOIN countries c ON c.country_code = d.country_code LEFT JOIN provinces pr ON pr.province_code = d.province_code LEFT JOIN regions_cities rc ON rc. = d. WHERE `rc`.`region_name` = 'Philadel...'