I have a problem with my code on buy. I was wondering if anyone can help me identify the error. Whenever I go to the buy and enter the symbol and shares and click buy, it shows a 500 Internal Server Error. Also, am I accessing the value of cash correctly? Here is my code.
The terminal shows this.
I was thinking the error is on this line and I replaced the first question mark with a name and removed the variable user_id. Still the same thing. Please help me. Thank you in advance
db.execute("INSERT INTO ? (symbol, name, shares, price, amount) VALUES(?, ?, ?, ?, ?);",user_id, symbol, name, shares, price, amount)