select * from (select A.*,Rownum Rnum from(select * from board order by ref desc,re_step asc)A)
이거를 mysql구문으로 바꾸어주세요..!ㅠㅠ
SELECT * FROM (SELECT A.*, @ROWNUM:=@ROWNUM+1 Rnum FROM(SELECT * FROM board ORDER BY ref DESC,re_step ASC) A)