h sql="select count(*) from t_user where username=%s and " \
"password = %s"
cursor.execute(sql,(username,password))
count = cursor.fetchone()[0]
return True if count == 1 else False
except Exception as e:
print(e)
finally:
if "con" in dir():
con.close()
老师,好像还是不行