字符串参数:一定要将单引号替换成2个单引号,这点非常重要
正常方式:SELECT * FROM 客户信息 WHERE 客户编号='001'
注入方式:SELECT * FROM客户信息WHERE客户编号='001'; UPDATE 客户信息 SET 客户编号 = NULL--'
结果:你的客户信息将全部化为乌有,或许还有更加凄惨的故事
数值参数:一定要检测参数是否是数字型
正常方式:UPDATE 账户信息 SET 账户余额=1000 WHERE 客户编号='001'
注入方式:UPDATE 账户信息 SET 账户余额=1000; FROM DELETE账户信息--; WHERE 客户编号='001'
结果:账户信息里面所有的数据,将全部清空,后果,你懂
更多细节,需各位用心防范,不要真的将论编程到跑路。