Apr-21-2019, 04:19 PM
Whenever i run the following code the if statement always returns true and it is not comparing the content with the column content so how can i do this?
How can i check the values with database tables
How can i check the values with database tables
import pyodbc con = pyodbc.connect(r'Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=path of db;') cr= cn.cursor() x="something" y="any" while True: if (cursor.execute('select * from table1 where cm1=(?)',(x)): print("success") break else: break