dvbbs
收藏本页
联系我们
论坛帮助
dvbbs

堕落街论坛多乐前线灌水乐园 → 继续灌水!(有人看的懂没)


  共有285人关注过本帖树形打印

主题:继续灌水!(有人看的懂没)

帅哥哟,离线,有人找我吗?
天下云
  1楼 个性首页 | 博客 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:初一 主题:47 精华:0 贴子:575 排名:196 威望:1 排名:538 注册:2007/3/21 23:21:48 近访:2010/12/23 15:32:09
继续灌水!(有人看的懂没)  发贴心情 Post By:2007/4/7 9:47:00

use bbsDB

go


set nocount on

print '---->>>>>>>各位大虾注意了,本论坛即将发布年度无记名评奖<<<<<<<<----'

--评估总体人气:如果论坛总点击率>1000,人气较旺

if(select sum(SclickCount)from bbsSection)>1000
 begin
  print '论坛人气年度评估:熊旺旺,大家辛苦了!'
 end
else
 begin
  print '论坛人气年度评估:一般般,大家加油啊!'
 end

--评选品牌版块和倒胃版块:主贴数量最多和最少的版块

print '年度品牌版块:'

select 版块名称=Sname,主贴数量=StopicCount,简介=Sprofile from bbsSection where StopicCount=(select max(StopicCount) from bbsSection)


print '年度倒胃版块:'

select 版块名称=Sname,主贴数量=StopicCount,简介=Sprofile from bbsSection where StopicCount=(select min(StopicCount) from bbsSection)

--评选回帖人气最旺的前两名作者

print '年度回帖人气最in的前两名获奖作者:'

select 大名=Uname,星级=Uclass from bbsUsers where UID in (select top 2 TuID from bbsTopic order by TclickCount desc)


--评选最差版主:如果存在发贴量为0或者点击率低于500的版块,则评选最差版主
if exists (select * from bbsSection where StopicCount = 0 or SclickCount<=500)
 begin
  print '请下列版块的斑竹加油哦!'
  
  select 版块名称=Sname,主贴数量=StopicCount,点击率=SclickCount from bbsSection
   where StopicCount=0 or SclickCount<=500
 end

/*--发主贴:
心酸果冻在.NET技术版块发贴:
怯怯的问:什么是.NET啊?
微软的.NET广告超过半个北京城啊...
--*/


declare @userID varchar(10),@sID int   --存放用户编号和版块编号

select @userID=UID from bbsUsers where Uname='心酸果冻'

select @sID=SID from bbsSection where Sname like '%.NET技术%'

--发贴
insert into bbsTopic(TsID,TuID,Tface,Ttopic,Tcontents)
 values(@sID,@userID,3,'什么是.NET啊?','我*!微软的.NET广告超过半个北京城啊...')

--更新版块表,主贴数+1
update bbsSection set StopicCount = StopicCount+1 where SID = @sID


--更新用户积分
if not exists (select * from bbsTopic where Ttopic like '什么是.NET啊?' and TuID<>@userID)
 update bbsUsers set Upoint = Upoint+100 where UID = @userID
else
 update bbsUsers set Upoint = Upoint+50 where UID = @userID

--更新用户级别

update bbsUsers set Uclass = case
    when Upoint <500 then 1
    when Upoint between 500 and 1000 then 2
    when Upoint between 1001 and 2000 then 3
    when Upoint between 2001 and 4000 then 4
    when Upoint between 4001 and 5000 then 5
    else 6
         end
  where UID = @userID


--对外发布

select 发贴作者='心酸果冻',发贴时间=convert(varchar(10),Ttime,111),主题=Ttopic,内容=Tcontents from bbsTopic where TID=@@identity


--显示目前的最新排名

select 昵称=Uname,星级=case
   when Uclass=0 then ' '
   when Uclass=1 then '★'
   when Uclass=2 then '★★'
   when Uclass=3 then '★★★'
   when Uclass=4 then '★★★★'
   when Uclass=5 then '★★★★★' 
   else             '★★★★★★'
        end
 ,积分=Upoint from bbsUsers


go



人生最大的智慧,在于理智的放棄.

拿得起放不下那叫壓力,

拿得起放得下那叫助力.
0 支持(0中立(0反对(0回到顶部
美女呀,离线,留言给我吧!
●.Кid
  2楼 个性首页 | 博客 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 水王 の腐爛的微笑.`
等级:博士后 主题:220 精华:6 贴子:19110 排名:3 威望:28 排名:43 注册:2006/9/1 21:05:31 近访:2008/8/19 21:41:58
  发贴心情 Post By:2007/4/7 9:50:00

冒味.



转过身歇斯底里,回过头安静微笑!我若妖娆,便是桃花!

  

0 支持(0中立(0反对(0回到顶部
帅哥哟,离线,有人找我吗?
天下云
  3楼 个性首页 | 博客 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:初一 主题:47 精华:0 贴子:575 排名:196 威望:1 排名:538 注册:2007/3/21 23:21:48 近访:2010/12/23 15:32:09
  发贴心情 Post By:2007/4/7 9:52:00

你懂???


人生最大的智慧,在于理智的放棄.

拿得起放不下那叫壓力,

拿得起放得下那叫助力.
0 支持(0中立(0反对(0回到顶部
美女呀,离线,留言给我吧!
●.Кid
  4楼 个性首页 | 博客 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 水王 の腐爛的微笑.`
等级:博士后 主题:220 精华:6 贴子:19110 排名:3 威望:28 排名:43 注册:2006/9/1 21:05:31 近访:2008/8/19 21:41:58
  发贴心情 Post By:2007/4/7 9:55:00

没看.



转过身歇斯底里,回过头安静微笑!我若妖娆,便是桃花!

  

0 支持(0中立(0反对(0回到顶部
帅哥哟,离线,有人找我吗?
天下云
  5楼 个性首页 | 博客 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:初一 主题:47 精华:0 贴子:575 排名:196 威望:1 排名:538 注册:2007/3/21 23:21:48 近访:2010/12/23 15:32:09
  发贴心情 Post By:2007/4/7 9:58:00

以下是引用●.Кid在2007-4-7 9:55:00的发言:

没看.

伤心...我知道这太专业了

但是你也看的懂 中文撒



人生最大的智慧,在于理智的放棄.

拿得起放不下那叫壓力,

拿得起放得下那叫助力.
0 支持(0中立(0反对(0回到顶部