注册 登录
编程论坛 C# 论坛

求问用字符串取账号密码,这串代码最后的一个 " ' " 是什么意思???

炮哥 发布于 2017-11-02 18:09, 2114 次点击
string s ="select*from   PassWord   where ID='" + textBox1.Text + "and  password='" + textBox2.Text +  "'";
2 回复
#2
yuccn2017-11-02 18:30
select*from PassWord where ID='yyy' and  password='xxx'

翻译过来不就是这样吗?不过这样写不过滤下 看样子有sql 漏洞
#3
炮哥2017-11-02 18:37
string s ="select*from   PassWord   where ID='" + textBox1.Text +"'"  + "and  password='" + textBox2.Text +  "'";
为啥不用在中间加一个单引号???
1