Jan-22-2020, 07:21 PM
Well I've had a look and read through the document you referred me to, after reading through it all either its outdated as close() doesn't seem to work but quit() does, on top of that after adding the following adaptation to my code all it does is print what I've inserted but still refuses to input the data into the table I created, when I remove the quotations on the create table function, it tells me that 'table expenses' already exists however removing my adaptation (Line 4+5) the error that comes back is 'the table does not exist' so I'm just muddled..
Here's my adaptation of the code:
Here's my adaptation of the code:
def submit(): payload = (name_text.get(), Monthly_Income_text.get(), Monthly_Budget.get(), Monthly_Expenses.get()) c.execute("INSERT INTO expenses VALUES (?, ?, ?, ?)", payload) for row in c.execute('SELECT * FROM expenses'): print(row)All I need is to figure out why this doesn't insert the information into the preexisting table, once its inserted I'll make the larger box use pandas to view what has been inserted and that'll be that but its so difficult to understand when I read through it and nothing works, irritating and demoralising which is why I love and hate coding at the same time