• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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