?
Solved

display data alphabetically

Posted on 2010-08-25
3
Medium Priority
?
243 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
[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
3 Comments
 
LVL 5

Accepted Solution

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

Assisted Solution

by:bonjourjolie
bonjourjolie earned 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

752 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