Solved

decimals select from and order like 10 , 10.1, 10.2

Posted on 2006-06-17
3
227 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

734 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