I have an customer invoice table in my MySQL database with a DECIMAL(10,2) field called price.
When fetching these values in php and calculating a sum amount,
Indeed, floating point numbers are not precise. Either calculate in cent (multiply by 100 and calculate in integers), or calculate in strings using BC Math.