1

I have this query:

SELECT @i:=@i+1, s.* 
FROM quiz.score s 
WHERE id BETWEEN @a - @l1 AND @a + @l2 order by points desc;

@i:=@i+1 shoult increment with each row but I get for each record NULL.

I dont see the problem. Could you help me?

4

2 に答える 2