ponlo sin parentesis...
Código:
SET @a =0;
SELECT @a:=@a+1 as posicion, estrellas, aes.id_hattrick, nombre
FROM aseh_estrellas AS aes JOIN aseh_equipos AS ae ON aes.id_hattrick = ae.id_hattrick WHERE id_temp='38' AND id_fecha='1' ORDER BY estrellas DESC
y en cuanto a php, creo que no tiene ningun problema.
Un saludo.