dim rs,sql,key,strsql,page,i,x key=request("key") '搜索关键字 strsql="?key="&key page=cint(request("page")) if page="" or page<=0 or isnumeric(page)=false then page=1 set rs=..... sql="..... where .. like'%"%key&"%' or ... like'%"&key&"%'...."
<% Set conn = Server.CreateObject("ADODB.Connection") strcon="provider=microsoft.jet.oledb.4.0;data source="& _ server.mappath("mdb.mdb") conn.Open strcon Set rs = Server.CreateObject ("ADODB.Recordset") sql="select * from table order by id desc"
<!--#include file="../zj64_publicfile/Const.asp" --> <!--#include file="../zj64_publicfile/DB_Conn.asp" --> <% Dim DBC,Conn Set DBC = New DataBaseClass Set Conn = DBC.OpenConnection() Set DBC = Nothing
<% dim rst,sqlt,temp set rst=server.CreateObject("adodb.recordset") sqlt="select * from sj_user where 1=1" '判断是否选择了菜系类型 if request("caiid")<>"" then sqlt=sqlt&"and caiid='"&request("caiid")&"'"
sql="select * from user where" if username<>"" then sql=sql&" username like'%"&username&"%'" flag=1 elseif tel<>"" and flag=1 then sql=sql&" and tel like '%"&tel&"%'" flag=1