Ok, I didnt want to ask this simple question but i'm really getting
tired of searching with no successes!
All I want is to display all unique records from my database.

When I use this in my actions:
$this->set('list', $this->Post->findAll());

it works fine but does shows all records.

I tried this:
$this->set('list', $this->Post->find(null,
'DISTINCT`Post`.`category_id`'));
But It does not work, when I do that only only pulls category_id out
of the database, none of the other data.


Oh, and this is my view:
foreach($list as $category): ?>

        <li><?php echo $html->link(__($category['Category']['title'],
true), array('action'=>'archive', $category['Post']['category_id'])); ?
> </li>

<?php endforeach; ?>

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

Reply via email to