C#模糊查询。提示“脚本错误”?
string sql_str = "";
sql_str = "Select * from System_product where flag=0 And NameM like '%"+txt1.Text+"%' ";
不能这样写吗?
大家都怎么针对一个字符字段进行模糊查询,又能防止注入漏洞啊?求助中。。。
...全文
989打赏收藏
C#模糊查询。提示“脚本错误”?
C#模糊查询。提示“脚本错误”? string sql_str = ""; sql_str = "Select * from System_product where flag=0 And NameM like '%"+txt1.Text+"%' "; 不能这样写吗? 大家都怎么针对一个字符字段进行模糊查询,又能防止注入漏洞啊?求助中。。。