http://groups.google.com/group/cake-php/browse_thread/thread/b32341e00a1324bb/916efdf548c20b68?lnk=gst&q=afterfind+fullname&rnum=1#916efdf548c20b68
On Apr 7, 12:43 pm, "zen" <[EMAIL PROTECTED]> wrote:
> Hi, Cake noob here...
>
> I've been searching for a while for this...
> but can't seem to find the solution...
>
> basicly what i'd like to do is to generate an array
> using generateList, then populate a dropdown using
> the result set. what i can't seem to do is to make
> it generate more than more value per key, here is the
> code:
>
> $this->set(
> 'Players',
> $this->Player->generateList(null, 'lastname ASC', null,
> '{n}.Player.id', '{n}.Player.lastname')
> );
>
> I's to make so that it becomes smth like this
> (obviously the following code doesn't work):
>
> $this->set(
> 'Players',
> $this->Player->generateList(null, 'lastname ASC', null,
> '{n}.Player.id', '{n}.Player.firstname'.' '.'{n}.Player.lastname')
> );
>
> so that the result set is smth like this:
> array(
> '1' => 'Kobe Bryant',
> '2' => 'D-Wade',
> '3' => 'Chien-Ming Wang',
> '4' => 'Dice-K Matsuzaka'
> );
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---