I want to create a website where users will have accounts that will have funds that can be spent or withdrew. By the way I am using a mySql db.
Lets say a user has $10 in their account and they place an order for $5.

Could I just user the UPDATE statement to update the balance? Also how would I be able to log the order into the transaction history?