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 'ORDER BY name' at line 7
SELECT name, path
FROM files AS f
LEFT JOIN collections_files AS cf ON cf.id_file = f.id
WHERE cf.id_collection = '104' and f.id= ORDER BY name