Have looked at this? Perhaps sixth parameter!

http://api.cakephp.org/class_model.html#63ade7d3c6d03c83ab53a224e23ad9dd


Model::findAll          (       $        conditions = null,
                $       fields = null,
                $       order = null,
                $       limit = null,
                $       page = 1,
                $       recursive = null
        )

Returns a resultset array with specified fields from database matching
given conditions. By using the $recursive parameter, the call can
access further "levels of association" than the ones this model is
directly associated to.

Parameters:
        mixed   $conditions SQL conditions as a string or as an
array('field' =>'value',...)
        mixed   $fields Either a single string of a field name, or an
array of field names
        string  $order SQL ORDER BY conditions (e.g. "price DESC" or
"name ASC")
        int     $limit SQL LIMIT clause, for calculating items per page.
        int     $page Page number, for accessing paged data
        int     $recursive The number of levels deep to fetch associated
records

Returns:
    array Array of records public

Definition at line 1123 of file model_php5.php.

References $recursive, __resetAssociations(), afterFind(),
beforeFind(), ConnectionManager::getDataSource(), getID(), and
read().


On 27 Aug., 09:12, bunyan <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I have three models - City, State and Vacancy.
>
> City belongs to state and vacancy belongs to city.
> Setting $this->Vacancy->recursive = 2 and then calling 
> $this->Vacancy->findAll() with no parameters returns the Vacancy, City and 
> State
>
> data. But if I call $this->Vacancy->findAll() with array of fields as
> a second parameter, $this->Vacancy->recursive is ignored, and I get
> only Vacancy and City data.
>
> How can I both use the fields array and "recursive" option?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to