0

I have a value in my mysql column with float as my data type. The value is 4.49.

When I run the following command the following value is shown .. -0.000000228882

I am really confused as to why this is happening.

Here is the update command I am using..

UPDATE stores SET outstanding_balance = outstanding_balance - 4.49 , card_sales = card_sales - 4.49 , card_transactions = card_transactions - 1 WHERE store_id = 2 
John
  • 3
  • 1

1 Answers1

0
Decimal 

is the column datatype you need. Change these columns in your mysql table to this datatype. It is the most ideal for currency.

suchislife
  • 4,251
  • 10
  • 47
  • 78