1 answer
0 votes
Paginate? Recursive? What are they doing?
Avast,
One tutorial I used has this for the index() method:
$this->User->recursive = 0;
$this->set('users', $this->paginate());
which i was a little unsure what to do with. Ok, i get that I can now access, from my index.ctp, a $users variable,...
1 answer
0 votes
Counts for Associated Tables (hasMany)
I'd like some advice on the CAKE way of getting a count of an associated (recursion 1) table, and paginating that. e.g.
Recipe belongsTo Author
Recipe hasMany Commentsin my recipes_controller I have a function recentRecipes()` that will perform a...
2 answers
0 votes
Limit total number of results in Pagination?
I have a paginated page where I have over 1000 database records. How do I limit the per page results to 20 AND have the total results limited to 1000?
2 answers
0 votes
I can't get a user data condition requested with a null and spesific id
<?php
function someController()
{
$user_id = $this->Session->read('Auth.User.id');
$this->Announcement->recursive = 1;
$this->paginate = array
(
'conditions' => array
(
'Announcement.user_id' => array($user_id,null)
),
'limit'... 1 answer
0 votes
CakePHP paginate conditions in derived fields how?
Hello, i would like to paginate a list of games, where the sport is a chosen sport.
the relatition is as followed:
Game BelongsTo Competition BelongsTo Team BelongsTo sport
What i would like to do is show all games where the teams sport_id = 1.
The...
1 answer
0 votes
paginate bindModel, contain, group by
Hi!
How do I paginate this?
$numCount = count($searchTerms);
$contain =...