Solved

decimals select from and order like 10 , 10.1, 10.2

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now