【发布时间】:2021-05-06 12:59:12
【问题描述】:
update products set wcview = '1',ccview ='1' where pcprod_parentPrd = 33576 AND pcprod_relationship like '%18493%'
当我在用于连接数据库的 sql 客户端中执行时,此 sql 查询有效
但是当我使用经典的 asp 代码时也是一样的,比如
relation = Uid // This will give me 18439
wcview and ccview is 1 // I have tested this
query1 = "update products set wcview = " & wcView &",ccview = " & ccView &" where pcprod_parentPrd = "& pIdProduct &" AND pcprod_relationship like '%"& relation &"%'"
当 where 子句中的 LIKE 过滤器仅返回 1 行时,相同的查询正在工作,因此它更新了一行,但当 Like 过滤器超过一行时,它不会从经典 asp 更新。
从客户端来说这不是问题
请帮忙..
【问题讨论】:
-
Parameterised Queries 就是这样。
标签: sql asp-classic