Update和sql语句in出错,asp不执行

来源:百度知道 编辑:UC知道 时间:2024/05/21 00:13:52
conn.execute "Update [shop_product] Set kucun1=kucun1+1 where productid in (select productid from [shiyong] where id in ("&userid&"))"。userid是复选框的值.请各位高手指教一下

关键地方就在"where id in ("&userid&"))"这里,你输出userid看看是什么格式,只有是这样的格式才正确:123,158,597,而且必须是整数,否则SQL语句就不正确了。

如果你的userid不是这样的内容,你需要进行转换。如果需要大家帮你写转换代码,请你粘贴userid的值,也就是response.write userid的输出结果