I want to store a price for an item in decimal in MySQL.
How would I have to format the price in order to store in in the db?
I want to store a price for an item in decimal in MySQL.
How would I have to format the price in order to store in in the db?
You shouldn't need to do any formatting to store the data.
You can set the column type to decimal
and do the formatting only when you display the value in the client, not when you store it.