db.execute(
"INSERT INTO stocks (userID, symbol, shares, price, operation) VALUES (?, ?, ?, ?, ?)",
session["user_id"],
symbol.upper(),
-shares,
price,
"sell",
)
db.execute(
"UPDATE users SET cash = cash + ? WHERE id = ?",
shares_value,
session["user_id"],
)
flash("Sold!")
return redirect("/")
else:
stocks = db.execute(
"SELECT symbol FROM stocks WHERE userID = ? GROUP BY symbol",
session["user_id"],
)
return render_template("sell.html",
dimanche 19 décembre 2021
Python problem. Please find the eror and solve it [closed]
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire