Не удалось выполнить запрос. "SELECT s.*, ff.key as federation_image, fed.name as federation_name , c.name as club_name, fc.key as club_image FROM schools as s LEFT JOIN clubs as c ON(s.club_id = c.club_id) LEFT JOIN federations as fed ON (s.federation_id = fed.federation_id) LEFT JOIN files as ff ON(fed.imageFileID = ff.fileID) LEFT JOIN files as fc ON(c.imageFileID = fc.fileID) WHERE s.is_deleted=0 AND s.school_id=". You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 7