I have a CakePHP 1.3 website with a MySQL database. The problem is that i have some prices, double values, that are stored using a dot as a decimal delimiter, however my application front-end should display them using commas.
Is there a way to set this in the DB directly, or simply a better way to achieve this than str_replace EVERYWHERE? that would be such a hassle, and it just seems like bad practice to me.
Thank you in advance!
The decimal in the database is correct- it’s a decimal being used as a decimal. To display it, you should use number_format for presentation.