molding sql results in coldfusion

Posted on 2000-02-08
Medium Priority
Last Modified: 2013-12-24
I am trying to list a group of results by category in sql and have done by using 'ORDER BY category'.

I now want to display a text field from the same table alphabetically but it wont due to it being ordered by category which puts the list in category order.

How do i list the results in category order and when the categories are the same list the items by title alphabetically????....
Question by:fiazkhan

Accepted Solution

rcw119 earned 400 total points
ID: 2500151
Use The following:

ORDER BY category,title

This will order the statement first by category and then by title.  

Author Comment

ID: 2500165
This is perfect...

never though u could have more than one ORDER BY field...


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…

607 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