SELECT,t.title,t.departure,t.periodical ,GROUP_CONCAT((CONCAT_WS(CHAR(22 USING UTF8),, at.cDate,ia.flag,at.resize) )) AS `attachment` FROM `agency_tour` t LEFT JOIN item_attachment ia ON ia.itemId = AND ia.source = 'tour' AND ia.flag IN ('default','special') LEFT JOIN attachment at ON = ia.attachmentId INNER JOIN `agency_ttype` type ON AND type.visibility=1 INNER JOIN `agency_touritem` ticr ON AND ticr.source='country' INNER JOIN `agency_touritem` tici ON AND tici.source='city' WHERE t.lang='pe' AND t.visibility=1 AND t.`departure` >1422653554 AND t.status='special' GROUP BY ORDER BY t.`priority` DESC LIMIT 0 , 9