When I print the result of the query it provides the correct data, exactly as it is input in the column.
Print:
if I have the query as:
Example:
{Sonic's Extreme Tots}
{Mozzarella Sticks}
{Loaded Potato Skins}
and so on....
Only when I used the [o] in used the insert line did it remove the brackets, but then I cannot click one of the items displayed and have it load the data from the getRecipe query.
If I remove the [0] from the insert line and the curly brackets show again I can click an item and it will populate all fields properly.
Print:
each_result: ("Sonic's Extreme Tots",) each_result: ('Mozzarella Sticks',) each_result: ('Loaded Potato Skins\r\n',) each_result: ('Chile Con Queso\r\n',) each_result: ('Buffalo Blasts',)The problem I am having it that without having the [0] at the end of the insert line in that query it populates the widget with each item having the curly bracket at the beginning and end of each item listed.
if I have the query as:
def select(): try: output.delete(0, END) selection = var.get() c.execute('SELECT Recipe FROM Recipes WHERE Dish_Type = :selection ORDER BY Recipe DESC', {"selection": selection}) results = c.fetchall() for each_result in results: output.insert(0,each_result) except: messagebox.showerror("DataBase Error", "Failed to load category")This populates the widget as well but displays the curly brackets.
Example:
{Sonic's Extreme Tots}
{Mozzarella Sticks}
{Loaded Potato Skins}
and so on....
Only when I used the [o] in used the insert line did it remove the brackets, but then I cannot click one of the items displayed and have it load the data from the getRecipe query.
If I remove the [0] from the insert line and the curly brackets show again I can click an item and it will populate all fields properly.
"Often stumped... But never defeated."