level 2
千山~暮雪
楼主
<div class=nsf>
<b><br>
<font color="#EA7500">最近查询的食物:</font></b><ul>
<%
if ke<>"" then
strSql="select * from nutrient where mc like '%"&ke&"%' order by sj desc"
else
strSql="select top 48 * from nutrient order by sj desc"
end if
Set rs=server.CreateObject("ADODB.Recordset")
rs.Open strSql,conn,1,1
If Not rs.Bof And Not rs.Eof Then
Dim I
I=48
Do While Not rs.Eof And I>0
I=I-1
Response.Write Err.Description
zid=rs("id")
mc=rs("mc")
if len(mc)>7 then mc=left(mc,6)&".."
%><li><a href=yy.asp?id=<%=zid%>><%=mc%></a></li>
<%
rs.MoveNext
Loop
%>
<%
Else
Response.Write"该记录集为空"
End If
rs.Close
%>
<%
if rs.state<>0 then
rs.close
end if
if conn.state<>0 then
conn.close
end if
set rs=nothing
set conn=nothing
%></ul>
</div>
2014年05月12日 11点05分
1
<b><br>
<font color="#EA7500">最近查询的食物:</font></b><ul>
<%
if ke<>"" then
strSql="select * from nutrient where mc like '%"&ke&"%' order by sj desc"
else
strSql="select top 48 * from nutrient order by sj desc"
end if
Set rs=server.CreateObject("ADODB.Recordset")
rs.Open strSql,conn,1,1
If Not rs.Bof And Not rs.Eof Then
Dim I
I=48
Do While Not rs.Eof And I>0
I=I-1
Response.Write Err.Description
zid=rs("id")
mc=rs("mc")
if len(mc)>7 then mc=left(mc,6)&".."
%><li><a href=yy.asp?id=<%=zid%>><%=mc%></a></li>
<%
rs.MoveNext
Loop
%>
<%
Else
Response.Write"该记录集为空"
End If
rs.Close
%>
<%
if rs.state<>0 then
rs.close
end if
if conn.state<>0 then
conn.close
end if
set rs=nothing
set conn=nothing
%></ul>
</div>