Hi
Suppose I have a table like this.
Table: Shows
Id programme episode
101 Lost Episode 1
102 24 Episode 1
103 Heroes Episode 1
104 Prison Break Episode 1
105 House Episode 1
106 Lost Episode 2
107 24 Episode 2
108 Heroes Episode 2
109 Prison Break Episode 2
110 House Episode 2
Edit: Sorry messy table, was not suppose to look like this.
MOD EDIT: Fixed by adding [noparse]
..
[/noparse] bbcode tags.
And this is my query.
SELECT id, programme, episode FROM shows GROUP BY programme
The reason I have used GROUP BY is to eliminate programmes with the same name appearing more than once. The query achieves this.
But the problem is that this query outputs the first 5 programmes , I want to alter this so that it outputs the second 5 programmes.
This way the query will show the later episodes of each programme rather the older.
I have tried Order by id desc at the end of the query but this does not work.
Am thinking perhaps there is some way of adding desc into the SELECT or GROUP BY statements to sort the results in reverse.
I will great appreciate the assistance.
Thanks