I'm trying to make a simple blog system... I've created a Comment class
that looks like this:
<?php
class Comment extends AppModel
{
var $name = 'Comment';
var $belongsTo = array('Post');
}
?>
Now, in the admin panel I want to display say the last 15 comments
made, for moderation purposes. To do this normally I would do something
like this, in the appropriate method of the Comments controller:
$this->set('comments', $this->Comment->findAll(null, null, 'created
DESC'));
The thing is that when I do that, all I get is an error in the foreach
placed in my view, while I get absolutely no problems if I'm using
findAll without parameters...
Any ideas?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---