asp代码问题!!!!!急急急,在线等

来源:百度知道 编辑:UC知道 时间:2024/06/24 14:06:48
【下面这段asp代码是控制显示会员生日的,是按月显示,我想按每天显示,请高手帮帮忙啦~~~~~~~~~~】

<%
set rs=server.createobject("ADODB.Recordset")
sql="select truename,headpic,birthday from [txluser] where month(birthday)=month(Now())"

rs.open sql,conn,1,1
%>
<%if rs.eof then
response.write"本月没有人过生日"
else
set truename=rs("truename")
set headpic=rs("headpic")
do while not rs.eof
mymonth=datepart("m",rs("birthday"))&"月"&datepart("d",rs("birthday"))&"日"%>
<table width="98%" height="26" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" class="unnamed1" style="border-collapse: collapse">
<tr>
<td width="100%&qu

sql="select truename,headpic,birthday from [txluser] where month(birthday)=month(Now())"

改为

sql="select truename,headpic,birthday from [txluser] where month(birthday)=month(Now()) and day(birthday)=day(Now())"

'-------------------
response.write"本月没有人过生日"
改为
response.write"今天没有人过生日"

sql="select truename,headpic,birthday from [txluser] where month(birthday)=month(Now())"

改为
sql="select truename,headpic,birthday from [txluser] where day(birthday)=day(Now())"

-------------------
response.write"本月没有人过生日"
改为
response.write"今天没有人过生日"