The code I've written for the parameter checks all works fine, and on clicking the buy button everything seems to work... but then nothing gets added to my database! I've combed through the SQL query again and again. I'm so sure the syntax is correct, and I'm not getting any error messages... Can anyone spot where I'm going wrong?
# record purchase
purchase = db.execute("INSERT INTO transactions (user_id, symbol, name, shares, price, total) VALUES (:user_id, :symbol, :name, :shares, :price, :total)",
user_id=session["user_id"], symbol=result["symbol"], name=result["name"], shares="shares", price=result["price"], total="total")
A lengthier snippet of my code is here: https://gist.github.com/4b64b3d28aa19568d4bfbb0039cc47d8