Updating a database using variables.
Have tried multiple online solutions for updatign a database using a variable but none have worked. Please help!!
The code for updating is in the update procedure.
I am not sure but I think you need to have a global variable in your function ...
Stonks = 0 #your intial varible def Stock_add(amount): # telling the program that the varible is global (function must go after varible global stonks print("adding stocks") #adding to stonks by local parameter stonks += amount```