首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

abatis防止sql攻打

2012-10-07 
abatis防止sql攻击为了防止SQL注入,iBatis模糊查询时也要避免使用$$来进行传值。下面是三个不同数据库的iba

abatis防止sql攻击
为了防止SQL注入,iBatis模糊查询时也要避免使用$$来进行传值。下面是三个不同数据库的ibatis的模糊查询传值。


# mysql: select * from stu where name like concat('%',#name #,'%') 

# oracle: select * from stu where name like '%'||#name #||'%'

# SQL Server:select * from stu where name like '%'+#name #+'%

热点排行