so I have looked around for days and tried various solutions to other people issues that seem the same as my own but unfortunately I have not made any progress. I am still very new with python, tkinter, and mysqli databases. What I trying to do is have an inventory program, it's just that simple. You can login and add, delete or simply view what is in the database. I can add and delete items just fine but I am having an issue pulling the data in the correct columns.
So far I have tried to pull each as a variable and assign it accordingly, tried to pull one row at a time, even switch to a new database but have gotten no correct results. If I use sqlite 3 it works fine so is it because mysql is on a server and not local? Any way, I'd like some advice to point me in the right direction so any help is much appreciated.
Edit:
tree.insert("", 1, "dirIso", text="ProductID")
for n, dirIso in enumerate(results,1):
list_of_column_values = [list(_dict.values())[0] for _dict in dirIso]
tree.insert('dirIso', n, text=list_of_column_values[0],
values=list_of_column_values[1:])
cursor.close()
conn.close()
This is what I have done, I am now getting a 'str' object has no attribute 'values'. Do I need to change n? Or is it looking for the name inside of my database as values and not the columns?
Outcome I'm trying to get is for the table to display its respective data for each item.
dictinto aTreeview..insert(.... Show your last uses version"