I\'m looking for a way to sequentially number rows in a result set (not a table). In essence, I\'m starting with a query like the following:
SELECT
SELECT @i:=@i+1 AS iterator, t.* FROM tablename t,(SELECT @i:=0) foo