ASP高手进来!
会员生日提醒代码!
表:user
列:name,userinfo
userinfo:
email|homepage|1983-09-13
<!--#include file="conn.asp"-->
<%
dim birthday
set rs=server.createobject("adodb.recordset")
sql="select name,userinfo from [user] where del=0"
rs.open sql,conn,1,1
if rs.eof then
rs.movenext
else
userinfo=rs("userinfo")
userinfo=split(userinfo,"|")
birthday=userinfo(2)
set rs=conn.execute("select name from [user] where Month(birthday)="&Month(now())&" and Day(birthday)="&Day(now())&" and del=0")
if not rs.eof then
do while not brs.eof
%>
<tr>
<td class="bottomline"><div align="center"><%=rs("name")%></div></td>
<td class="bottomline"><div align="center"><%age=Date()-bb("birthday")%><%=DatePart("yyyy",age)%></div></td>
</tr>
<%
rs.movenext
loop
end if
end if
rs.close
set rs=nothing
%>
参考答案:啥