Currently my Decimal length values are set to (15,2) my figures are showing up as 1000.00 how can i add a comma so it looks like 1,000.00 also when im putting figures in Asc or Desc order its showing figures like 800.00 as higher than 1000.00 would the comma be the solution to this?
Database sorting is very limited without extended query options. Otherwise it is very basic character by character. 1 is lower than 8
Code: mysql> [B]CREATE TABLE test_deci(id INTEGER NOT NULL PRIMARY KEY,val DECIMAL(10,2));[/B] Query OK, 0 rows affected (0.31 sec) Code: mysql> [B]INSERT INTO test_deci VALUES (1,100.00),(2,200.00),(3,300.00),(4,400.00),(5,500.00);[/B] Query OK, 5 rows affected (0.00 sec) Records: 5 Duplicates: 0 Warnings: 0 Code: mysql> [B]SELECT * FROM test_deci ORDER BY val [COLOR=DarkRed]ASC[/COLOR];[/B] +----+--------+ | id | val | +----+--------+ | 1 | 100.00 | | 2 | 200.00 | | 3 | 300.00 | | 4 | 400.00 | | 5 | 500.00 | +----+--------+ 5 rows in set (0.00 sec) Code: mysql> [B]SELECT * FROM test_deci ORDER BY val [COLOR=DarkRed]DESC[/COLOR];[/B] +----+--------+ | id | val | +----+--------+ | 5 | 500.00 | | 4 | 400.00 | | 3 | 300.00 | | 2 | 200.00 | | 1 | 100.00 | +----+--------+ 5 rows in set (0.00 sec) Works fine for me !!!!!!!1