Solved

display data alphabetically

Posted on 2010-08-25
3
231 Views
Last Modified: 2013-12-13
hi
as an example of what i am looking for, consider this data in db?

id                 ref                        custref
1000           1                            cen1000
1001           2                            n248
1002           3                            cen1001
1003           4                            cen1002
1004           5                            n249

i think you get the idea. in the db the data is an unsorted order. my question is, what would be the way to display in page so that the custref data is listed by alpha? ie, all thbe cen #s first then the d's then the e's etc. because at the moment the page isdisplaying kindof unsorted even if i use orederby asc or desc. many thanks
0
Comment
Question by:peter_coop
3 Comments
 
LVL 5

Accepted Solution

by:
bernardbrink earned 125 total points
ID: 33519621
select id,ref,custref from table order by custref ASC
0
 
LVL 1

Assisted Solution

by:bonjourjolie
bonjourjolie earned 125 total points
ID: 33519729
Select * from table order by custref ASC.
if custref's data is non english it might have a problem with exact order, but i'll order by ascii code
0
 

Author Closing Comment

by:peter_coop
ID: 33520337
thsnk you
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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
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.

757 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

13 Experts available now in Live!

Get 1:1 Help Now