mysql 排序之後添加 序列號 以及查詢

select * from (select id,name,score,ipone,time,(@i:=@i+1) as i from `user`,(select (@i:=0)) b order by score desc time asc) c where ipone=%d; ",array($where['ipone']));

select (@i:=@i+1) as i,user. * from user,((select @i:=0) as it) ORDER BY score DESC , time asc



//防止mysql亂碼
set names utf8

發佈了22 篇原創文章 · 獲贊 12 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章