sql语句是
select a.username,(@rowNum:=@rowNum+1) as c,a.integral as 积分from xs_user a,(Select (@rowNum :=0 ) ) b order by integral DESC,time
知道用户名么, 直接select 用户名,积分 from table where 用户名=用户名不就完事了么
??出表??。
SELECT * FORM ( select a.username,(@rowNum:=@rowNum+1) as c,a.integral as 积分 from xs_user a,(Select (@rowNum :=0 ) ) b order by integral DESC,time ) T WHERE username='XXX'
SELECT * FORM ( select a.username,(@rowNum:=@rowNum+1) as c,a.integral as 积分 from xs_user a,(Select (@rowNum :=0 ) ) b order by integral DESC,time ) T WHERE username='XXX'
SELECT * From ( select a.username,(@rowNum:=@rowNum+1) as c,a.integral as 积分 from xs_user a,(Select (@rowNum :=0 ) ) b order by integral DESC,time ) T WHERE username=18511337033'
[SQL] SELECT * From ( select a.username,(@rowNum:=@rowNum+1) as c,a.integral as 积分 from xs_user a,(Select (@rowNum :=0 ) ) b order by integral DESC,time ) T WHERE username=18511337033'[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 6
SELECT * FORM ( select a.username,(@rowNum:=@rowNum+1) as c,a.integral as 积分 from xs_user a,(Select (@rowNum :=0 ) ) b order by integral DESC,time ) T WHERE username='XXX'