Are you serious????? Ok, you guys need a Set::combine tutorial or something!
I've been trying to figure this out how to combine fields for a few months now. I've been reduced to creating a custom array in a foreach loop. But I knew, deep down inside, there must be way. ThanX -- Baz L Web Development 2.0 http://WebDevelopment2.com/ On Feb 11, 2008 3:59 AM, roryy <[EMAIL PROTECTED]> wrote: > > It works, thank you very much! > Now i'm gonna try to make a function to combine the two functions :) > On 11 feb, 10:41, grigri <[EMAIL PROTECTED]> wrote: > > find('list') only works with simple fields, you won't be able to do > > this. > > > > Still, it's easy enough with find('all') and Set::combine(): > > > > $people = $this->Person->find('all', array( > > 'fields' => array('id', 'firstname', 'insertion', 'surname'), > > 'recursive' => -1 > > )); > > $list = Set::combine( > > $people, > > '{n}.Person.id', > > array('%s %s %s', '{n}.Person.firstname', '{n}.Person.insertion', > > '{n}.Person.surname') > > ); > > > > On Feb 11, 9:25 am, roryy <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hello cakephp friends, > > > > > I have 2 tables. Communications and people. In communications/add i > > > want a list where you can choose one person from table people. But you > > > don't see his name, only his ID. I have these fields in table people: > > > > > id > > > firstname > > > insertion > > > surname > > > > > Can someone help me to make a list where you can see a persons > > > firstname, insertion and surname with find('list' , .....) in the > > > communication controller. > > > > > Thanks in advance!- Tekst uit oorspronkelijk bericht niet weergeven - > > > > - Tekst uit oorspronkelijk bericht weergeven - > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
