I am have alot of data in my table and i do not want to do multiple
finds and rather do 1 find and use Set::combine or Set::extract, just
not sure how....

This is my current data:

[0] => Array
        (
            [Attribute] => Array
                (
                    [id] => 1
                    [controller] => Profiles
                    [category] => Basics
                    [item] => Lookingto
                    [value] => Friendship
                    [created] => 0000-00-00 00:00:00
                    [modified] => 0000-00-00 00:00:00
                )

        )

    [1] => Array
        (
            [Attribute] => Array
                (
                    [id] => 2
                    [controller] => Profiles
                    [category] => Basics
                    [item] => Lookingto
                    [value] => A Relationship
                    [created] => 0000-00-00 00:00:00
                    [modified] => 0000-00-00 00:00:00
                )

        )

    [2] => Array
        (
            [Attribute] => Array
                (
                    [id] => 3
                    [controller] => Profiles
                    [category] => Basics
                    [item] => Lookingto
                    [value] => Whatever I can get
                    [created] => 0000-00-00 00:00:00
                    [modified] => 0000-00-00 00:00:00
                )

        )

here is what i need it to look like
array(1=>"Friendship",2=>"A Relationship",3=>Whatever I can get)

notice the ids are coming from
{n}.Attribute.id

and the values are comning from
{n}.Attribute.value
where the item = 'Lookingto'

This is what i have so far:
Set::combine($data,'{n}.Attribute.id','{n}.Attribute.value')

but how do i tell it  where the item = 'Lookingto'
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to