我这代码用起来显示正常,但一定是有问题,谁帮改安全点,给高分

来源:百度知道 编辑:UC知道 时间:2024/05/18 12:24:35
if flag_syjh=1 then '判断是否需要审核才显示
if keyword="0" then
sql="select type,Info_ID,showname,dateandtime,web,gsid,company,country,city,content from info where (showname like '%"&title&"%' or [content] like '%"&request("txtitle")&"%') and dateandtime>=date()-"&cint(datetime)&" and flag=1 order by info_id desc"
else
sql="select type,Info_ID,showname,dateandtime,web,gsid,company,country,city,content from info where (showname like '%"&title&"%' or [content] like '%"&request("txtitle")&"%') and dateandtime>=date()-"&cint(datetime)&" and type like '%"&keyword&"%' and flag=1 order by info_id desc"
end if
else
if keyword="0" then
sql="select type,Info_ID,showname,dateandtime,web,gsid,company,country,city,content from info where (showname like '%"&title&"

date()与cint(datetime)数据类型不同,不能相减。

if flag_syjh=1 then '判断是否需要审核才显示
if keyword="0" then
sql="select type,Info_ID,showname,dateandtime,web,gsid,company,country,city,content from info where (showname like '%"&title&"%' or [content] like '%"&request("txtitle")&"%') and dateandtime>=date()-"&cdate(datetime)&" and flag=1 order by info_id desc"
else
sql="select type,Info_ID,showname,dateandtime,web,gsid,company,country,city,content from info where (showname like '%"&title&"%' or [content] like '%"&request("txtitle")&"%') and dateandtime>=date()-"&cdate(datetime)&" and type like '%"&keyword&"%' and flag=1 order by info_id desc"
end if
else
if keyword="0" then
sql="select type,Info_ID,showname,dateandtime,web,gsid,company,country,city,content from info