• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

decimals select from and order like 10 , 10.1, 10.2

I need to have sub menu, and I need to know how to select from table where number is 10 and if 10 have sub content like 10.1, 10.2 etc.

how to get results, and sort like 10.1, 10.2
0
phlackee
Asked:
phlackee
  • 2
1 Solution
 
phlackeeAuthor Commented:
I know with php function

round ($number, 1);

but how to get and how to sort.

thanx
0
 
Khanh DoanSenior DeveloperCommented:
SELECT * FROM table ORDER BY id ASC

and your id field type FLOAT, so you can insert 10.1 into your database.
Goodluck.
Bonmat86.
0
 
phlackeeAuthor Commented:
I did it but thanks for try.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now