views:

319

answers:

1

Hi,

I'm kind of new to cakePHP and get to the moment where i have to do pagination.

The comments table has a parent_id and the threaded query is working correctly so now, I want to paginate the results.

My problem is the limited sql query affects all the retrieved comments and I only want to limit the parent ones because the other way, it leaves replies out of the query.

Hope I'd be clear and you can help me.

Thanks.

A: 

You probably need to do the query for just the parents (topics?) then another query for each tree below that.

Leo