Questions tagged with paginate

1 answer

0 votes

Asked by aiyer, on 11/1/10 in

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

Asked by twistedpear, on 19/1/10 in

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 Comments

in my recipes_controller I have a function recentRecipes()` that will perform a...

2 answers

0 votes

Asked by TyCam, on 3/2/10 in

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

Asked by JacopKane.myopenid.com, on 8/2/10 in

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

Asked by Calimer0, 3 weeks, 1 day ago in

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

Asked by sucram, 1 week, 2 days ago in

paginate bindModel, contain, group by

Hi!

How do I paginate this?


		$numCount = count($searchTerms);		
		$contain =...
<< previous next >>