I want to compare the some string with the database table and throw an output in python | Sololearn: Learn to code for FREE!
0

I want to compare the some string with the database table and throw an output in python

#My code Email="abc@123.com: Pw="XYZ123" while True: if Cr.execute('select * from db1.db where email="+Email+"'AND password="+Pw"): print("success") else: print("Fail") #The if statement is not comparing and printing success even if email and password are wrong

21st Apr 2019, 3:28 PM
Aksfh
1 Odpowiedź
0
Probably because your select is working well, but it returns zero answers. You have to count results.
21st Apr 2019, 7:59 PM
Илья Кузнецов
Илья Кузнецов - avatar