Recommended: Solutions when including single quotes in ASP query conditions When we are building ASP websites, query is often the most basic function, but we know that single quotes are used to represent character-type data in ASP query statements, and must be used in double use. If only one single quote is used, there will definitely be an error. Regarding this phenomenon, I provide my solution below. In fact, in ASP, if there are single quotes in the keywords to be queryed, you only need to use
<%Functioncutbadchar(str)
badstr=No|Writing|Ming|Ming|Symbol|Column|Format' Fill in uncivilized words here, use|Separate
badword=split(badstr,|)
Fori=0toUbound(badword)
Ifinstr(str,badword(i))>0then
str=Replace(str,badword(i),***)
EndIf
Next
cutbadchar=str
EndFunction
%>
Share: Example analysis program to capture weather forecast When I was working in the company in the morning, I saw snow falling outside. The first snow in 2008 was a little later than before. Haha, cold