hao0089 发表于 2016-11-9 06:00:12

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 #+'%
页: [1]
查看完整版本: abatis防止sql攻击