Alphabetical ordering ----- HOW TO ?????

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Eugene
Forum Newbie
Posts: 24
Joined: Tue Jun 18, 2002 12:40 pm
Location: Montreal

Alphabetical ordering ----- HOW TO ?????

Post by Eugene »

Hi everyone

Happy Xmas

Here is what I am battling with. I have a table that will contain names and other info. The content will be displayed on a page, and I need it to be alphabetically ordered. How to do this??????

I was thinking that there is probably a sort() function in php that I can use to alphabetically order the results of the query. However this means that on every hit, the function would be ran which is kind of a waste of ressources.

Second, I though it would be best if the info in the table was already alphabetically ordered so I can directly display the result of the query. Can this be done???? Is there a command in MySQL to alphabetically order entries???? If there is, when new info is added in the table, can it also be used to place the data appropriatelly?????

Thank you very much for any sugestions.

Huge
User avatar
Eugene
Forum Newbie
Posts: 24
Joined: Tue Jun 18, 2002 12:40 pm
Location: Montreal

Post by Eugene »

DOOOP

I realise I am a bit rusted.

Can I do something like adding the folwing in the query:

OREDER BY alphabetical

thanks
Beans
Forum Commoner
Posts: 49
Joined: Mon Dec 23, 2002 3:06 am
Location: Manila, Philippines
Contact:

Post by Beans »

Yes.
Post Reply