Log in

View Full Version : Sorting colums in PHP/Mysql



midotouch
09-09-2007, 05:06 PM
Hi all,

I have a mysql table as follows:-

Pos Team Pts
1 Arsenal 0
2 Blackburn 0
3 Derby 3

I can sort this table on points using the ORDER BY function, but this yields the following table:-

Pos Team Pts
3 Derby 3
1 Arsenal 0
2 Blackburn 0

I want it to look like this:-

Pos Team Pts
1 Derby 3
2 Arsenal 0
3 Blackburn 0

Is there a command which allows me to sort all the table, except for the Position column which I need to remain a constant?

Your expertise would be greatly appreciated

Kind Regards:)