I had this problem a while back too - I believe it has to do with a
join occurring (the 'having' part?). There isn't really a way to get
around this AFAIK, and I think it was explained as a feature to me
more so than a 'bug'.
Zoltan
www.yyztech.ca
On Mar 6, 2:16 pm, "Aldo" <[EMAIL PROTECTED]> wrote:
> Hello
>
> I'm getting a strange result with the following configuration in my
> component:
>
> $fieldArray = array('id', 'prev', 'filename',
> 'fileExtension','folder',"if(fileExtension='0', filename,
> concat(filename, '.', fileExtension)) AS fullfilename");
> $fileData = $this->controller->$controllerName->findAll("id=$id",
> $fieldArray);
>
> $queryArray = array(
> "$controllerName.id" => "!=
> $id",
> "$controllerName.folder" => 0,
> "$controllerName.prev" =>
> $fileData[0][$controllerName]["prev"]
> ,"having" =>
> array("$controllerName.filename" => "skyline.jpg")
> );
>
> $findOther =
> $this->controller->$controllerName->findAll($queryArray,
> $fieldArray);
>
> Result of $findOther:
>
> Array
> (
> [0] => Array
> (
> [Treeview] => Array
> (
> [id] => 15
> [prev] => 1
> [filename] => nyc_skyline.jpg
> [fileExtension] => 0
> [folder] => 0
> )
>
> [0] => Array
> (
> [fullfilename] => skyline.jpg
> )
>
> )
>
> )
>
> Why the 'fullfilename' field is not showed in the 'Treeview' array?
>
> Thanks for any help.
> Aldo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---