如题,为什么添加了转义字符就可以防止SQL注入了?
3条回答 默认 最新
- hcqDezhp 2021-01-19 14:50关注
例如
输入 1 and true
select * from table where id = 1 and true;
select * from table where id = '1 and true'
第一条会把全部数据都查出来
第二条会把id=1的查出来
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决评论 打赏 举报无用 1
例如
输入 1 and true
select * from table where id = 1 and true;
select * from table where id = '1 and true'
第一条会把全部数据都查出来
第二条会把id=1的查出来