语法错误 (逗号) 在查询表达式 'n_id = 6, 11' 中。
发布网友
发布时间:2022-04-24 00:35
我来回答
共2个回答
热心网友
时间:2023-09-17 11:44
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("t_id") <> "") Then
Recordset1__MMColParam = Request.QueryString("t_id")
End If
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn_STRING
Recordset1.Source = "SELECT * FROM ntype WHERE t_id = " + Replace(Recordset1__MMColParam, "'", "''") + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
如果你传递过来的参数是t_id的话(没看到你传递过来的参数)
热心网友
时间:2023-09-17 11:45
Recordset1.Source = "SELECT * FROM ntype WHERE t_id in( " + Replace(Recordset1__MMColParam, "'", "''") + ")"
试下。