Right - that makes sense - but it still doesn't work.

print_r($this->NewsItem->findAll(null, 'DISTINCT
NewsItem.source_name'));

doesn't print anything out. Neither does $feeds have any data in it.
This SQL code works though (tested in phpMyAdmin):

SELECT DISTINCT source_name FROM istudios_news_items

So I'm not really sure what's going on. This is all the relevant code:
Controller:
   function index()
    {
                $this->pageTitle = ", Front Page";
                $this->set('feeds',$this->NewsItem->findAll(null, 'DISTINCT
source_name'));
                print('test');
                print_r($this->NewsItem->findAll(null, 'DISTINCT source_name'));
                $this->set('newsitems',
$this->NewsItem->findAll('','','story_date desc',10));
    }

Layout:

$newsformatter->printFeedSelector($feeds);

Helper:

                function printFeedSelector($feeds)
                {
                        foreach ($feeds as $raw)
                        {
                                $feed = $raw['NewsItem'];
                                print $this->Html->link($feed['source_name'], 
'source/' .
$feed['source_name']);
                        }
                }

I'd really appreciate any help here - it's really perlexing me!


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