I've written come code that selects certain data from a sqlite3 database and outputs them as follows:
2017-06-05 test 09:00:00 11:00:00
2017-06-12 test 09:00:00 11:00:00
2017-06-19 test 09:00:00 11:00:00
2017-06-26 test 09:00:00 11:00:00
I want to get the dates, and change them so they are a heading for the other data. How would I go about selecting the dates and making them headers?
Example of what I want;
2017-06-05 (in larger font)
name of timeslot: test
start time: 09:00:00
end time: 11:00:00
code that handle the search function:
def searched():
Main_Screen.configure(state = 'normal')
Main_Screen.delete('1.0', END)
searched_for = search.get()
timeslot = cursor.execute('''SELECT * FROM dates WHERE Name = (?)''',(searched_for,))
list1 = list(cursor.fetchall())
cursor.execute('''SELECT COUNT(*) FROM dates WHERE Name = (?) ''',(searched_for,))
result = cursor.fetchone()
output_text = '\n'.join([' '.join(row) for row in list1])
Main_Screen.insert(tkinter.END, output_text)