Working with decimals in PHP apps

3

DB Basics Let’s talk about some of the basics first. float vs decimal In general, floating-point values are usually stored as float in the database. In earlier versions of databases they also often had precision/scale (e.g. float(5,2) for values like…