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 ') AS EquipoAct FROM f_jugadores INNER JOIN f_jugaposicion ON (f_jugadores.Po' at line 1