Solved

display data alphabetically

Posted on 2010-08-25
3
233 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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.

863 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

25 Experts available now in Live!

Get 1:1 Help Now