select t2.rowno 
from( select (@rownum:=@rownum+1) as rowno, t1.id  
 from news t1 ,(select (@rownum :=0) ) b 
 where .....) t2
 where t2.id=504
posted on 2016-07-20 16:41  踏歌&而行  阅读(484)  评论(0编辑  收藏  举报