Database query failed: SQLSTATE[42000]: Syntax error or access violation: 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 ')' at line 22

Last SQL query:

SELECT DISTINCT escorts.id, gender, name, escorts.tel, email, site, anni, title, annuncio as
description, link, COALESCE(last_updated, CURDATE()) as last_updated, ch_score,
zone, zone_id, uid as uuid, secret_uid, subscriptions_spiderized.importance, CONCAT(file_name, extension) as
foto,
c.it_name as it_city_name, COALESCE(c.en_name, c.it_name) as en_city_name, c.page as city_page,
c.male_adj as city_male_adj, c.fem_adj as city_female_adj, c.en_adj as city_en_adj,
c.en_page as city_en_page, c.id as city_id, c.importance as city_importance,
r.it_name as it_region_name, COALESCE (r.en_name, r.it_name) as en_region_name, r.page as region_page,
r.male_adj as region_male_adj, r.fem_adj as region_female_adj, r.en_adj as region_en_adj,
r.en_page as region_en_page, r.id as region_id, r.importance as region_importance,
n.id as nation_id, n.it_name as nation_it_name, n.en_name as nation_en_name, n.it_fem_adj as nation_fem_adj, n.it_mal_adj as nation_male_adj, n.en_adj as nation_en_adj,
z.it_name as it_main_city_zone, COALESCE (z.en_name, z.it_name) as en_main_city_zone
FROM spider_escorts.tels
LEFT JOIN spider_escorts.escorts on spider_escorts.escorts.id = escort_id
LEFT JOIN subscriptions_spiderized ON spider_escorts.escorts.id = subscriptions_spiderized.escort_id AND subscriptions_spiderized.site_id = 15
JOIN spider_escorts.photos on spider_escorts.escorts.id = photos.escort_id AND
file_name = '1'
LEFT JOIN escort_gallery.cities as c on c.id = spider_escorts.escorts.province_id
LEFT JOIN escort_gallery.zones as z on z.id = spider_escorts.escorts.zone_id
LEFT JOIN escort_gallery.regions as r on c.region_id = r.id
LEFT JOIN escort_gallery.nations as n on r.nation_id = n.id
WHERE escorts.id IN ()

Query id: 4368573 - Classe spiderizedescort.php - function get_escort