<!--#include file="../include/function.php"--> <% lmfrom = Request.QueryString("from") fromdt = Request.QueryString("fromdt") todt = Request.QueryString("todt") if not empty(fromdt) and not empty($todt) thensql = "select * from web_user where lmfrom='"&lmfrom&"' and regtime>='"&fromdt&"' and regtime <='"&todt&"' and lmzt=2 order by id asc"else sql = "select * from web_user where lmfrom='"&lmfrom&"' and lmzt=2 order by id asc"; end if Set rs = Server.CreateObject("adodb.recordset") rs.open sql,conn,1,1 while not rs.eof Response.write "会员ID:"&rs("lmuid")&",注册时间:"&rs("regtime")&",来访IP:"&rs("lmip")&",状态:成功<br>"&vbcrlf rs.movenext wend rs.close %>
没有测试 <!--#include file="conn.asp"--> <% lmfrom = request("from") fromdt = request("fromdt") todt = request("todt") if fromdt<>"" and todt<>"" then sql = "select * from web_user where lmfrom='$lmfrom' and regtime>='$fromdt' and regtime <='$todt' and lmzt=2 order by id asc" else sql = "select * from web_user where lmfrom='$lmfrom' and lmzt=2 order by id asc" end if set rs=server.createObject("adodb.recordset") rs.open cmd,conn,1,1do while not rs.eof response.write "'会员ID:"&rs("lmuid") loop %>
看一下书自己转
爱莫能助
<%
lmfrom = Request.QueryString("from")
fromdt = Request.QueryString("fromdt")
todt = Request.QueryString("todt")
if not empty(fromdt) and not empty($todt) thensql = "select * from web_user where lmfrom='"&lmfrom&"' and regtime>='"&fromdt&"' and regtime <='"&todt&"' and lmzt=2 order by id asc"else sql = "select * from web_user where lmfrom='"&lmfrom&"' and lmzt=2 order by id asc"; end if
Set rs = Server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
while not rs.eof
Response.write "会员ID:"&rs("lmuid")&",注册时间:"&rs("regtime")&",来访IP:"&rs("lmip")&",状态:成功<br>"&vbcrlf
rs.movenext
wend
rs.close
%>
<!--#include file="conn.asp"-->
<%
lmfrom = request("from")
fromdt = request("fromdt")
todt = request("todt")
if fromdt<>"" and todt<>"" then
sql = "select * from web_user where lmfrom='$lmfrom' and regtime>='$fromdt' and regtime <='$todt' and lmzt=2 order by id asc"
else
sql = "select * from web_user where lmfrom='$lmfrom' and lmzt=2 order by id asc"
end if
set rs=server.createObject("adodb.recordset")
rs.open cmd,conn,1,1do while not rs.eof
response.write "'会员ID:"&rs("lmuid")
loop
%>