I am working on web app and this my table of stocks I own
symbol user_id price shares stock
AAPL 1 $10 50 APPLE INC.
TSLA 1 $15 50 TESLA
I am having trouble on selling shares I want to sell 1 share of apple so shares become 49 SO in sql can i do something like sell 1 share of apple whoser user_id = 1 I am using this
db.execute(DELETE share FROM table WHERE user_id = 1 and symbol = aapl)
but its not working
Aucun commentaire:
Enregistrer un commentaire