set @rn=0
select * from (
select @rn:=@rn+1 as rn,mc.* from web_member_character as mc
ORDER BY $order desc) as tb where uid = $uid
代码附上~ 很好用 利用mysql变量实现
select * from (
select @rn:=@rn+1 as rn,mc.* from web_member_character as mc
ORDER BY $order desc) as tb where uid = $uid
代码附上~ 很好用 利用mysql变量实现