MySQL中的十进制INT

We currently have a table row set to INT and a php script that adds the value of 5000 every 60 seconds(cron). We now need the ability include a decimal point.

If we change the addition value of 5000 to say 5000.19, would this work with INT? or do we need to change the row to Decimal?

I hope that makes sense.

Breakdown:

Current Setup

Start Number: 12500 (INT) Increase Amount: +5000 (No decimal)

We now need it to work with decimals:

Start Number: 12500 Increase Amount: +5000.19 (with decimal)

You could just change the column to "text" or "varchar" as a lazy work around, it will work fine in most circumstances

Yes, you will need to convert the column's data type. INT columns store only integer numbers.

alter table my_table modify time_value decimal(18,4);

Make sure you choose the correct precision and scale values for the decimal type.