I have a slight problem with my code. What I am trying to do is output all of the information from the 'result' variable rather than just the latest entry. I understand that the 'config' method is within the for loop and this is why it is outputting the latest entry but I cannot seem to work out any other way of doing it.
If anyone could help it would be much appreciated.
def view_content(self):
connection.connect(user="root", password="")
query = "SELECT * FROM users WHERE User_ID <5"
cursor.execute(query)
results = cursor.fetchall()
for result in results:
self.answer.config(text=result[0:])
Thanks, Notorious