用sql的查询语句
你这里其实多个条件
为或关系,用or连接
select * from bannerold where adddate=date()
or adddate between date()-7 and date()-14
<%
sql="select * from bannerold where adddate>=#"&date1&"# and adddate<=#"& date2& "# order by id asc"
'date1为前日期格式为####-##-##
'date2为后日期格式为####-##-##
'可查询任意时间段
'如果二个值都等于date()则查询当天的%>
今天的:
sql="select count(name) from bannerold where date(adddate)="&date()