there is the start of some information on Set:: at
http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-for-breakfast/

Sam D

On Feb 11, 2008 9:04 AM, Baz <[EMAIL PROTECTED]> wrote:
> 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 -
> >
> >
> >
> >
> > > >
> >
>



-- 
-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/
http://blog.samdevore.com/cakephp-pages/i-cant-bake/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to