日期:2014-05-17 浏览次数:20450 次
alter proc proc_IntegralMng(@page int,@pagesize int)
as
select Integral.ID,PhoneUserInfo.RealUserName,Integral.Integral,IntegralStatus.LoginNumber,
IntegralStatus.CommentNumber,IntegralStatus.ShareNumber,IntegralStatus.PublishNumber,IntegralStatus.StatusTime
from Integral
left join IntegralStatus on Integral.UserID = IntegralStatus.LoginID
left join PhoneUserInfo on PhoneUserInfo.Id = Integral.UserID
where IntegralStatus.LoginID <> 0 and PhoneUserInfo.RealUserName is not null and
PhoneUserInfo.RealUserName <> '' order by Integral.integral desc,StatusTime desc
where PhoneUserInfo.RealUserName+IntegralStatus.StatusTime not in
(select top(@pagesize * (@page-1)) PhoneUserInfo.RealUserName+IntegralStatus.StatusTime from Integral
left join IntegralStatus on Integral.UserID = IntegralStatus.LoginID
left join PhoneUserInfo on PhoneUserInfo.Id = Integral.UserID
where IntegralStatus.LoginID <> 0 and PhoneUserInfo.RealUserName is not null and
PhoneUserInfo.RealUserName <> '' order by Integral.integral desc,StatusTime desc)
and IntegralStatus.LoginID <> 0 and PhoneUserInfo.RealUserName is not null and
PhoneUserInfo.RealUserName <> '' order by Integral.integral desc,StatusTime desc