Python Forum

Full Version: sqlite3 check last record
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have many records in table and I have the field enabled that can be either yes or no. I am making select statement that gets all records with enabled being no. How to check only the last record that has the value for enabled equals no. It might not be the last record in the table.

My select:

c.execute("Select * from temp where enabled ='no'")
How to make this find the last record available in the table.

Thanks.
This answer (on another forum) will do the trick: https://stackoverflow.com/a/24495092