Solved

decimals select from and order like 10 , 10.1, 10.2

Posted on 2006-06-17
3
228 Views
Last Modified: 2013-12-12
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
Comment
Question by:phlackee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Author Comment

by:phlackee
ID: 16926870
I know with php function

round ($number, 1);

but how to get and how to sort.

thanx
0
 
LVL 10

Accepted Solution

by:
Khanh Doan earned 500 total points
ID: 16926875
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
 
LVL 3

Author Comment

by:phlackee
ID: 16926918
I did it but thanks for try.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question