在DW中ASP如何多条件查询?严重!
表明:只在DW中,其他的免答!错误代码如下:<%DimRecordset1__MMColParamRecordset1__MMColParam="1"If(Request...
表明:只在DW中,其他的免答!错误代码如下:
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request("pp") <> "") Then
Recordset1__MMColParam = Request("pp")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_manage_STRING
Recordset1_cmd.CommandText = "SELECT * FROM Ixxm_News WHERE pp = ? ORDER BY id ASC"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 255, Recordset1__MMColParam) ' adVarChar
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 450
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
搜索页面中 有多个文本框 提交一个表单 !
DW中第一个表单变量搜索指定精确字段,其他表单变量搜索模糊字段,当所有条件成立的时候,显示数据,当其中一个条件成立的时候,显示数据!
思路清楚,不知如何代码表现出来! 记住,一定要按DW代码!
答得好,再加分!谢谢!
搜索的预览图如下! 展开
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request("pp") <> "") Then
Recordset1__MMColParam = Request("pp")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_manage_STRING
Recordset1_cmd.CommandText = "SELECT * FROM Ixxm_News WHERE pp = ? ORDER BY id ASC"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 255, Recordset1__MMColParam) ' adVarChar
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 450
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
搜索页面中 有多个文本框 提交一个表单 !
DW中第一个表单变量搜索指定精确字段,其他表单变量搜索模糊字段,当所有条件成立的时候,显示数据,当其中一个条件成立的时候,显示数据!
思路清楚,不知如何代码表现出来! 记住,一定要按DW代码!
答得好,再加分!谢谢!
搜索的预览图如下! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询