标题: 又出问题了啊~~~ [打印本页] 作者: 敬你永远遗忘 时间: 2010-1-18 01:50 标题: 又出问题了啊~~~ <% action=request("action") if action<>"" then snr=request("snr") stype=request("stype") Set Rs=conn.execute( "Select * From [liuyan] where "&stype&" like '%"&snr&"%' Order BY id DESC ") if rs.bof and rs.eof then response.write "<tr><td align='center'>没有找到你所查询的内容</tr></td>" end if else Set Rs = Server.CreateObject("ADODB.Recordset") Sql = "Select * From [liuyan] Order BY id DESC " Rs.Open Sql,conn,1,1 end if %> 这里判断数据库记录为空是这样的吗?作者: 青松 时间: 2010-1-18 01:50
<% action=request("action") if action<>"" then snr=request("snr") stype=request("stype") Set Rs=conn.execute( "Select * From [liuyan] where "&stype&" like '%"&snr&"%' Order BY id DESC ") if rs.bof or rs.eof then response.write "<tr><td align='center'>没有找到你所查询的内容</tr></td>" end if else Set Rs = Server.CreateObject("ADODB.Recordset") Sql = "Select * From [liuyan] Order BY id DESC " Rs.Open Sql,conn,1,1 end if %>作者: Bu怕Bu怕 时间: 2010-1-18 01:50
以下是引用就这样子在2005-6-3 16:53:38的发言: <% action=request("action") if action<>"" then snr=request("snr") stype=request("stype") Set Rs=conn.execute( "Select * From [liuyan] where "&stype&" like '%"&snr&"%' Order BY id DESC ") if rs.bof and rs.eof then response.write "<tr><td align='center'>没有找到你所查询的内容</tr></td>" end if '去掉 else Set Rs = Server.CreateObject("ADODB.Recordset") Sql = "Select * From [liuyan] Order BY id DESC " Rs.Open Sql,conn,1,1 end if %> 这里判断数据库记录为空是这样的吗?
这里判断数据库记录为空是这样的作者: 逍遥的雨夜 时间: 2010-1-18 01:50
明白~~~作者: 水乡渔夫 时间: 2010-1-18 01:50
对于我是初学者来说并不懂呀,希望多教作者: 痴情浪子 时间: 2010-2-8 03:05
真是佩服得六体投地啊