ASP中Replace将字符串中逗号转成','
dimsnamedimzhsname=Request("name")zh=Replace("&sname&",",","','")sql="select*fromminx...
dim sname
dim zh
sname = Request("name")
zh= Replace("&sname&",",","','")
sql="select * from minxi where CPH in('"&zh&"')"
看来看去好像就是在 replace这个转换的时候将逗号左右两边多加一个单引号,想半天没想出来如何加,请大家帮帮忙,谢谢!~ 展开
dim zh
sname = Request("name")
zh= Replace("&sname&",",","','")
sql="select * from minxi where CPH in('"&zh&"')"
看来看去好像就是在 replace这个转换的时候将逗号左右两边多加一个单引号,想半天没想出来如何加,请大家帮帮忙,谢谢!~ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询