$this->link->find('all', array('contain'=>array('Icon')));

HTH, Paul.

On Nov 6, 5:16 pm, Tomfox Wiranata <tomfox.wiran...@gmail.com> wrote:
> hi everyone,
>
> i want to apply the contain function but i cant get it to work.  so
> this is my find in the users_ controller :
>
> $this->Link-> find('all',   conditions etc.);
>
> now debugging this find method shows that cake returns the result as
> this:
>
> Array
> (
>     [0] => Array
>         (
>             [Link] => Array
>                 (
>                     [fk_user_id] => 76
>                     [title] => Rot
>                     [description] =>
>                     [created] => 2011-10-30 16:40:33
>                     [hash] => a872ca5c991cfa388d0ac29c78c09
>                     [date_locked] =>
>                     [id] => 214
>                     [locked] =>
>                     [parent_id] =>
>                     [number_ratings] => 0
>                     [average_rating] =>
>                     [average_rating_rounded] =>
>                     [rating_lastvoted] =>
>                 )
>
>             [User] => Array
>                 (
>                     [username] => ma
>                     [firstname] => Ma
>                     [lastname] => W
>                     [hash] => a707e9e245888cd65ccc5a6984124200
>                     [id] => 76
>                 )
>
>             [Parent] => Array
>                 (
>                     [fk_user_id] =>
>                     [title] =>
>                     [description] =>
>                     [created] =>
>                     [hash] =>
>                     [date_locked] =>
>                     [id] =>
>                     [locked] =>
>                     [parent_id] =>
>                     [number_ratings] => 0
>                     [average_rating] =>
>                     [average_rating_rounded] =>
>                     [rating_lastvoted] =>
>                 )
>
>             [Settings] => Array
>                 (
>                     [id] =>
>                     [color_headline] =>
>                     [color_headline_background] =>
>                     [color_background] =>
>                     [fk_link_id] =>
>                 )
>
>               MORE code here......
>
> all i need from this data is the [Link] array and the [Icon] array...
> this is so depressing cause i tried dozens of combinations....
>
> so how do i do this? $this-> link-> contain.........
>
> appreciate it :)

-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to