Sqla="Select count(ArticleName) as TotalArticle From Article,count(ArticleName) as TodayArticle From Article Where DateDiff('d',ArticleTime,now)>0 and DateDiff('d',ArticleTime,now)<1"
Sqla="Select count(ArticleName) as TotalArticle From Article,count(ArticleName) as TodayArticle From Article Where DateDiff('d',ArticleTime,now)>0 and DateDiff('d',ArticleTime,now)<1 这个SQL语句有些太复杂了,一个表的统计用了两个From应该没必要吧?试试下面这个样子的SQL语句 "Select count(Article.ArticleName) as TotalArticle From Article Where DateDiff('d',ArticleTime,now)>0 and DateDiff('d',ArticleTime,now)<1"
Sqla="Select count(ArticleName) as TotalArticle From Article sqlb="select count(ArticleName) as TodayArticle From Article Where DateDiff('d',ArticleTime,now)>0 and DateDiff('d',ArticleTime,now)<1" 两个分别用可以显示出来。。就是不知道如何把他们只用一个SQL语句
Sqla="Select count(*) as TotalArticle,count(ArticleName) as TodayArticle From Article Where DateDiff('d',ArticleTime,now)>0 and DateDiff('d',ArticleTime,now)<1" 这样也不行。。 我是想实现第一次统计所有.第二次统计当天的..请指点..谢谢!!
那好像只能分写,因为写在一句一起执行Sqla="Select count(*) as TotalArticle,count(ArticleName) as TodayArticle From Article Where DateDiff('d',ArticleTime,now)>0 and DateDiff('d',ArticleTime,now)<1" 就只能统计当天的,反正我是目前没有很好的办法。