I need to get a list of DISTINCT elements from a table. Looking through
the Cake manual/wiki, I can't find any explicit way of doing it in the
methods, so I'm making a query script to do it. The problem is that it
returns nothing, has anyone got a better way of doing it? Or a fix for
my query?

$this->set('feeds',$this->NewsItem->query('SELECT DISTINCT
`NewsItem`.source_name` AS `source_name`'));

Regards, Mike


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to