I need to know how to make prices go like this:
1,250.00€
Now in the BD I have it put like this, decimal(10,2)
and it looks like this: 1250.00€
I need to know how to make prices go like this:
1,250.00€
Now in the BD I have it put like this, decimal(10,2)
and it looks like this: 1250.00€
It is a question of format when representing the values and for this you have the function FORMAT from MySQL
Structure to follow:
SELECT FORMAT(columna, 2) FROM tabla.
Sentence that solved the problem to the user (we do not know the sql table):
$results = $mysqli->query("SELECT Total, FORMAT(SUM(Total), 2) as suma, Fecha,Total FROM pedidos WHERE Estado=1 and Iduser =" . $_GET['ID']);