I am making an approval system to my account management system. Upon registering the user has an entry in the database as Approved which is set to false, but when an admin logs in, I want him to be returned a list of accounts with the approved row as False. I have tried with this SQL statement but am only getting the first not all of them.
c.execute("SELECT * FROM accounts WHERE approved=?", (False,))
ifapproved=c.fetchone()
print (ifapproved)
I have tried using a for loop but it just repeats the first account which is unapproved. How can I fix this?