asp日历,关于SQL语句问题
来源:百度知道 编辑:UC知道 时间:2024/06/15 07:36:18
我写了一个日历本,我想点击日起的时候,取出当天的日志记录。
year=ciker(Request.Querystring("year"))
month=ciker(Request.Querystring("month"))
day=ciker(Request.Querystring("day"))
下面怎么样写SQL语句?我只能写出对应的年,高手帮一下菜鸟。
sql="select * from ciker_blog where year="+year
year=ciker(Request.Querystring("year"))
month=ciker(Request.Querystring("month"))
day=ciker(Request.Querystring("day"))
下面怎么样写SQL语句?我只能写出对应的年,高手帮一下菜鸟。
sql="select * from ciker_blog where year="+year
sql="select * from ciker_blog where year="&cstr(year)&" and month="&cstr(month)&" and day="&cstr(day)
sql="select * from ciker_blog where 日期函数 like'"&year&"'"
没测试过,理论可以!把年份相似的罗列出来
需要分别获取年,月,日的信息:
sql="select * from ciker_blog where year="&cstr(year)&" and month="&cstr(month)&" and day="&cstr(day) %>
再有,连接符最好用"&","+"有时会出现问题。