一次查询多条记录的ASP代码
来源:百度知道 编辑:UC知道 时间:2024/06/20 14:06:43
str = request.form("str")
str = split(str, vbcrlf)
s = ""
for i = 0 to ubound(str)
if str(i) <> "" then s = s & "'" & str(i) & "',"
next
s = left(s, len(s) - 1)
sql="select * from [表名] where [字段] in (" & s & ")"
str=replace(request.form("str"),vbCRLF,"|")
取得以"|"分隔的字符
sql="select * from [表明] where [字段名] in "&str&""