update wedonet_user set user_atime=GetDate() where id=0
update wedonet_user set isonline=0 where isonline=1 and datediff(n,user_atime,GetDate())>20
select top 4 id,classid,title from [wedonet_doc] where isdel=0 and ispass=1 and cid=4 and classid in (811) order by istop desc,cls asc,id desc
select top 1 id,classid,preimg,title from [wedonet_doc] where isdel=0 and ispass=1 and cid=4 and classid in (812) and isgood=1 order by istop desc,cls asc,id desc
select top 10 id,classid,title from [wedonet_doc] where isdel=0 and ispass=1 and cid=4 and classid in (812) order by istop desc,cls asc,id desc
select top 10 id,classid,title from [wedonet_download] where isdel=0 and ispass=1 and cid=20 and classid<>-2 order by istop desc,cls asc,id desc
select top 6 id,classid,preimg,title,timelong from [wedonet_video] where isdel=0 and ispass=1 and cid=8 and classid<>-2 order by istop desc,cls asc,id desc
select top 1 id,classid,preimg,title,timelong from [wedonet_video] where isdel=0 and ispass=1 and cid=8 and classid in (761) order by istop desc,cls asc,id desc
select top 1 id,classid,preimg,title,timelong from [wedonet_video] where isdel=0 and ispass=1 and cid=8 and classid in (775) order by istop desc,cls asc,id desc
select top 1 id,classid,preimg,title,timelong from [wedonet_video] where isdel=0 and ispass=1 and cid=8 and classid in (771) order by istop desc,cls asc,id desc
select top 5 id,classid,title from [wedonet_doc] where isdel=0 and ispass=1 and cid=4 and classid in (915) order by istop desc,cls asc,id desc
select top 4 id,classid,preimg,title from [wedonet_book] where isdel=0 and ispass=1 and cid=22 and topicid=214 and classid<>-2 order by istop desc,cls asc,id desc
select top 4 id,classid,stime,title from [wedonet_doc] where isdel=0 and ispass=1 and cid=4 and classid in (916) order by istop desc,cls asc,id desc
select top 10 id,classid,title from [wedonet_doc] where isdel=0 and ispass=1 and cid=5 and classid<>-2 order by istop desc,cls asc,id desc
select top 10 id,title from [wedonet_keyword] order by mycount desc