asp+access 多条件(多字段)查询

2025-03-23 14:57:38
推荐回答(1个)
回答1:

dim x
x="where id="&id
单一条件查询

sql="delete * from phone "&x
多条件(假设字段为a、b、c、d)查询,id不为空
if a<>"" then x=x& and a="&a
if b<>"" then x=x& and b="&b
if c<>"" then x=x& and c="&c
sql="delete * from phone "&x