When data is returned from MySQL, it is automatically returned as strings, regardless of the MySQL data type.
Is there any way to tell MySQL/PHP to maintain the data
If you want to get the values ordening by Price, you can change the Data Type to FLOAT from column (ex: price)
EX:
TABLE eletronics
price id
----------------
55.90 1
40.33 2
10.60 3
1596.90 4
56.90 5
PHP:
$sql = $pdo->query("SELECT * FROM eletronics ORDER BY price DESC");
//result
1596.90 4
56.90 5
55.90 1
40.33 2
10.60 3
//The order is being per prices //OBS: You can change the dots with "," using the str_replace() //result: 1596,90 - 56,90 - 55,90 - 40,33 - 10,60 etc.