php sql order problem... breaking ties?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Citizen
Forum Contributor
Posts: 300
Joined: Wed Jul 20, 2005 10:23 am

php sql order problem... breaking ties?

Post by Citizen »

Lets say I want to order a mysql query by a particular column, but there may be lots of entries with the same values. I want one to come before the other if they are tied and one has more of a different column.

So instead of
Entry - Value - Value2
Entry 1 - 4 - 2
Entry 2 - 4 - 3

It comes up as

Entry 2 - 4 - 3
Entry 1 - 4 - 2
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Post Reply