日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

BBS中父模块缩进,子模块归属父模块的实现方式

發布時間:2023/12/19 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 BBS中父模块缩进,子模块归属父模块的实现方式 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
BBS中父模塊縮進,子模塊歸屬父模塊的實現方式

板塊顯示順序問題

在tbl_board表中增加一個顯示順序字段 order

alter table tbl_board
add ( order_num number(3) );

update tbl_board set order_num = 20 where boardname = '.NET技術';

update tbl_board set order_num = 21 where boardname = 'C#語言';
update tbl_board set order_num = 22 where boardname = 'WinForms';
update tbl_board set order_num = 23 where boardname = 'ADO.NET ';
update tbl_board set order_num = 24 where boardname = 'ASP.NET ';

update tbl_board set order_num = 10 where boardname = 'Java技術';

update tbl_board set order_num = 11 where boardname = 'Java基礎';
update tbl_board set order_num = 12 where boardname = 'JSP技術 ';
update tbl_board set order_num = 13 where boardname = 'Servlet技術 ';
update tbl_board set order_num = 14 where boardname = 'Eclipse應用';

update tbl_board set order_num = 30 where boardname = '數據庫技術';

update tbl_board set order_num = 31 where boardname = 'Oracle ';
update tbl_board set order_num = 32 where boardname = 'SQL Server';

update tbl_board set order_num = 40 where boardname = '娛樂';
update tbl_board set order_num = 41 where boardname = '灌水樂園';

commit;

-------------------------------------------------------------------------

清單查詢sql

select b.boardname , nvl(t1.topic_count , 0) as topic_count , t2.title , t2.uname , t2.publishtime
from tbl_board? b
left join ( select boardid , count(*) as topic_count from tbl_topic group by boardid ) t1 on b.boardid = t1.boardid
left join (
?select boardid ,title , uname , publishtime
?from tbl_topic t21
?join tbl_user u on t21.userid = u.userid
?where publishtime = (
??select max(publishtime)
??from tbl_topic t22
??where t22.boardid = t21.boardid
?)
) t2? on b.boardid = t2.boardid
order by b.order_num;

?

posted on 2012-09-24 20:16 moonfans 閱讀(...) 評論(...) 編輯 收藏

轉載于:https://www.cnblogs.com/moonfans/archive/2012/09/24/2700613.html

總結

以上是生活随笔為你收集整理的BBS中父模块缩进,子模块归属父模块的实现方式的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。