标签:sel 利用 where 不为 .exe select 本质 cursor info
用处 ; 防止用户利用特殊符号来进行非法登录
uname = input()
upwd = input()
sql = select * from userinfo where user= %s and upwd=%s
res = cursor.execute(sql,[uname,upwd]))#这样可以防止用户使用特殊符号,本质是吧特殊符号进行了替换 将特殊符号过滤掉
where res :#res为的到的行数 如果这个行数不为0 说明账号密码正确
print(登录成功)
标签:sel 利用 where 不为 .exe select 本质 cursor info
原文地址:https://www.cnblogs.com/16795079a/p/10316581.html