to use conditions in paginate use something like this:

public function index() {
$this->Topic->recursive = 0;

$conditions = array('type' => $this->request->data['Topic']['type']);
                $this->paginate(' Topic ', array($conditions)); 
}


$this->request->data['Topic']['type']  is data coming from a form in your 
view.

On Friday, July 27, 2012 3:46:01 PM UTC-4, Kevin Mitchell wrote:
>
> PS: I guess I should start by learning how to do this with find() rather 
> than paginate().
>
> I have working ...
>
> public function index() {
> $this->Topic->recursive = 0;
> $conditions = array("Topic.type = 'Bk'");
> debugger::dump($this->Topic->find('all', array('conditions' => 
> $conditions))); die;
> }
>
> So, my question becomes: how do I pass a value the value 'Bk' to 
> $conditions?
>
> ... and, how would this be different using paginate() instead of find().
>
> Thank you!
> Kevin
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to