Asp classic asp'[字符串:“从订单中选择*”]
大家好,我有一些代码的问题,我找不到错误Asp classic asp'[字符串:“从订单中选择*”],asp-classic,Asp Classic,大家好,我有一些代码的问题,我找不到错误 sql = "select " * " from products where pic = 1 and product_code in (" count = ubound(codes) for each code in codes if len(code) > 0 then sql = sql & "'" & code & "'" if
sql = "select " * " from products where pic = 1 and product_code in ("
count = ubound(codes)
for each code in codes
if len(code) > 0 then
sql = sql & "'" & code & "'"
if i < count - 1 then sql = sql & ","
i = i + 1
end if
next
sql = sql & ")"
set res = lo_con.execute(sql)
你的绳子上没有星星。尝试:
sql = "select * from products where pic = 1 and product_code in ("
你的绳子上没有星星。尝试:
sql = "select * from products where pic = 1 and product_code in ("
您得到了什么错误?您的sql字符串错误。但是你没有告诉我们关于你的代码的任何错误。在SO中,您需要更加具体。当您调试这样的查询时,通常最好输入响应。在执行查询的行之前写入sql行,这样您就可以看到失败的实际查询。您得到了什么错误?您的sql字符串是错误的。但是你没有告诉我们关于你的代码的任何错误。在SO中,您需要更加具体。在调试这样的查询时,通常最好将其放入响应中。在执行查询的行之前写入sql行,以便可以看到失败的实际查询