34,576
社区成员
发帖
与我相关
我的任务
分享
Sql语句:
string productName=something value
string strSql=string.Format("select * from MyTable where ProductName like '%{0}%'",productName)
注:MyTable 是普通产品表
string productName="';Drop database dbname;--"
string productName="';Drop table MyTable;select 1 where ''='"
如果我的Sql语句后面再加个条件,
如"select * from MyTable where ProductName like '%"+ProductName +"%' and 1=1"
这样会被如何攻击?