Replace(Command1__m_id, "'", "''") 的问题
if(Request("newsID") <> "") then Command1__m_id = Request("newsID")
set Command1 = Server.CreateObject(")
Command1.ActiveConnection = MM_news_STRING
= "DELETE FROM news WHERE n_ID in(" + Replace(Command1__m_id, "'", "''") + ") "
= 1
= 0
Command1.Prepared = true
Command1.Execute()
response.Redirect("news_list.asp")
else
response.write ("<script>alert('您没有选择任何记录!');history.go(-1);</script>")
end if
上段代码中,Replace(Command1__m_id, "'", "''") 这句单引号从何而来,Command1__m_id只是数字啊,没单引号啊?为什么要改成''