原语句及出现的错误提示
语句如下:(数据库连接文件已经在上面了)
<%
set rs=server.createobject("adodb.recordset")
sql="select * from member where DateDiff('d',birthday,'"&Year(now())&"-"&Month(now())&"-"&Day(Now())&")=0 And DateDiff('m',birthday,'"&Year(now*()&"-"&Month(now())&"-"&Day(now)&")=0 "
rs.Open sql,conn,1,1
Do while not rs.EOF
Response.Write "今天生日的用户"&rs("membername")
rs.MoveNext
Loop
%>
错误提示:
错误类型:
Microsoft VBScript 编译器错误 (0x800A03EA)
语法错误
/0315/admin/case_tj/dealcount.asp, line 960, column 145
sql="select * from member where DateDiff('d',birthday,'"&Year(now())&"-"&Month(now())&"-"&Day(Now())&")=0 And DateDiff('m',birthday,'"&Year(now*()&"-"&Month(now())&"-"&Day(now)&")=0 "
上面错误提示说明以下这句话是错的.
sql="select * from member where DateDiff('d',birthday,'"&Year(now())&"-"&Month(now())&"-"&Day(Now())&")=0 And DateDiff('m',birthday,'"&Year(now*()&"-"&Month(now())&"-"&Day(now)&")=0 "
[[it] 本帖最后由 xiongjl9555 于 2008-7-7 22:27 编辑 [/it]]