Retrieving data in CakePHP
April 23, 2008A function to retrieve data in CakePHP is the findAll() model function.
It has the following syntax:
PLAIN TEXT
PHP:
findAll($conditions, $fields, $order, $limit, $page, $recursive);
string $conditions;
array $fields;
string $order;
int $limit;
int $page;
int $recursive;
For example to retrive all the data from a table you will use following:
PLAIN TEXT
PHP:
$this->set($var, $this->Modelname->findAll());
With the “set function” the $var value will be send to the [...]