js+asp总结(2)
sqlt="select sum(count) as dt from [count]";
rst.open(sqlt,conn,1,1);
//实现当日访问量
var rsd = Server.CreateObject("adodb.recordset");
sqld="select sum(count) as dd from [count] where day(dae) = '"+((new Date).getDate())+"' and Month(dae) = '"+((new Date).getMonth()+1)+"' and Year(dae) = '"+((new Date).getYear())+"'";
rsd.open(sqld,conn,1,1);
//实现昨日访问量
var rsz = Server.CreateObject("adodb.recordset");
sqlz="select sum(count) as zd from [count] where day(dae) = '"+((new Date).getDate()-1)+"' and Month(dae) = '"+((new Date).getMonth()+1)+"' and Year(dae) = '"+((new Date).getYear())+"'";
rsz.open(sqlz,conn,1,1);
//实现当月访问量
var rsm = Server.CreateObject("adodb.recordset");
sqlm="select sum(count) as dm from [count] where Month(dae) = '"+((new Date).getMonth()+1)+"'";
%>
暂时就想到这么多,顺便说明一下,本人很菜,以上要有不正确之处还望高人指出.
希望版主将此贴置顶,以后相关JS写ASP的问题都可以在此提出.让一些学习JS写ASP的朋友有一个更好的交流空间.
内容版权声明:除非注明,否则皆为本站原创文章。