网站信息统计的简单实现过程
作者:pcsky
![](http://www.nbxw.com/news/userimage/2004813203324.gif)
SQL语句如下:
运行环境:
VS.Net 2003
用OleDbConnection控件
其中用到了子表,因为分开来写不太方便
![](http://www.nbxw.com/news/userimage/2004813203324.gif)
SQL语句如下:
SELECT DD.SumHits, AA.CountArt, CC.WeekUpdate, BB.RegUserNum
FROM
(SELECT COUNT(newsid) AS CountArt FROM article) AA,
(SELECT COUNT(id) AS RegUserNum FROM Admin) BB,
(SELECT COUNT(newsid) AS WeekUpdate FROM(article) WHERE DateDiff('ww', DateAndTime, Now()) >= 7) CC,
(SELECT SUM(hits) AS SumHits FROM Article) DD
运行环境:
VS.Net 2003
用OleDbConnection控件
其中用到了子表,因为分开来写不太方便