I have a table of shows each having a name and similar data. I am trying to list them but I only want to display the last occurrence of each show.
Example: id: 1 name: Stargate Atlantis id: 2 name: Stargate Atlantis id: 3 name: Stargate Atlantis id: 4 name: Army Wives id: 5 name: Army Wives id: 6 name: Army Wives id: 7 name: Mythbusters id: 8 name: Mythbusters id: 9 name: Traveler I only want to list 1 of each kind of show. So the list would show (having the last added show from the list is important) Stargate Atlantis id: 3 Army Wives id: 6 Mythbusters id: 8 Traveler id: 9 I hope that makes sense. Now my question is, how do you do this with a mysql query and maybe a little logic in the controller. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
