On Wed, Jun 3, 2009 at 8:20 AM, Toutankharton <[email protected]> wrote:
>
> Hey everyone,
>
> I'm trying to select all of my projects belonging to a client, but I
> fail to use generatetreelist and conditions.
>
> I tried :
>
> $this->Project->generatetreelist(null, array('Project.client_id' =>
> '3'), null, null, '...');
$this->Project->generatetreelist(
array('Project.client_id' => '3'),
null,
null,
'...'
);
> since the second parameters seems to be the conditions in the doc... I
> got this errror :
>
> Warning (2): array_combine() expects parameter 1 to be array, null
> given [CORE/cake/libs/set.php, line 972]
>
> don't ask why, but I tried :
>
> $this->Project->generatetreelist(array('Project.client_id' => '3'),
> null, null, null, '...');
>
> and it works, but i have all my projects at the same level :
>
> Array
> (
> [32] => Project 1
> [44] => Subproject 2
> [11] => Project 2
> )
>
> where i should have
>
>
> Array
> (
> [32] => 'Project 1'
> [11] => 'Project 2'
> [44] => '...Subproject 2'
> )
>
Because you have null where the '...' should be.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---