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 6 : SELECT c1.id, pays.id, saisons.nom, c2.id, c1.idbase, id_sport, c1.id_pays, c1.withgroup, saisons.id
FROM championnats AS c1
LEFT JOIN championnats AS c2 ON c2.id = c1.idbase
JOIN pays ON pays.id = c1.id_pays
JOIN saisons ON saisons.id = id_saison
WHERE c1.id =
SELECT lp.id_saison FROM livescore.championnats lc INNER JOIN livescore.pays lp ON lp.id = lc.id_pays WHERE lc.id =
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 1