SELECT max(abonnement_end) as end, abonnement.*, user.*, asso_abonnement_album.* FROM abonnement INNER JOIN user ON abonnement.user_id=user.user_id INNER JOIN asso_abonnement_album ON asso_abonnement_album.abonnement_type_id=abonnement.abonnement_type_id WHERE abonnement.abonnement_id in( 1,,) AND asso_abonnement_album.album_id = '218' GROUP BY abonnement.abonnement_id ORDER BY abonnement_date DESC ; 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 ') AND asso_abonnement_album.album_id = '218' GROUP BY abonnement.abonnement_id ' at line 1 page : /l-eleve-ducobu-lutte-classes-tome4-A218