Thank you kind sir!  Worked perfectly and I didn't even have to modify
anything.  I was just missing the 'conditions' statement, tried it
with 'limit' and it wasn't working figured I was on the right track,
just using the wrong wording.

Thanks again!

On Jul 2, 7:30 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> You have to specify the condition. If the model is named "Comment" and
> the column is "approved" :
>
> var $paginate = array(
>     'conditions' => array('Comment.approved' => 1),
>     ....
> );
>
> On Wed, Jul 2, 2008 at 7:02 PM, Cody Sortore <[EMAIL PROTECTED]> wrote:
>
> > hello, I'm trying to create a simple guest book type commenting page,
> > so far I've got everything working.  The only thing that I cannot
> > figure out is how to get Cake to only serve up "approved" comments.
> > Right now anything that is put into the comment box shows up
> > immediately on the front end.  I want to approve the comments first
> > through the admin panel, which I even have working.  How do I get it
> > to fetch only the comments that are equal or greater than 1 in the
> > approved column of the DB?
>
> > If you could just steer me in the right direction I'm sure I can find
> > the answer somewhere.  Problem now is I'm such a n00b that I don't
> > even really know where to look.  I got the paginate function to work
> > so only 10 comments show up at a time, and have tried finding a way to
> > use that to limit my results, but haven't had any luck.  Maybe I was
> > on the right track, but just searching for the wrong things?  I don't
> > know, any help would be greatly appreciated!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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