I'm using currently the find('all') but the result is quite
disappointing, a single record looks like this:
[0]=>
array(4) {
["Employee"]=>
array(1) {
["id"]=>
string(3) "312"
}
[0]=>
array(1) {
["firstname"]=>
string(14) " Konfi 4 BA "
}
}
it works, but i think there should be a more elegant way to do this
On 12 Okt., 14:12, "euromark (munich)" <[email protected]>
wrote:
> manually with find(all) and building the array yourself
>
> or by simply using the multiple_display_field behaviour from the
> bakery etc
>
> On 12 Okt., 12:37, Buggy <[email protected]> wrote:
>
> > Hello,
>
> > i tried to receive a list by callign find('list'):
>
> > $employees = $this->Employee->find('list', array(
> > 'fields' => array('Employee.id',
> > "CONCAT(Employee.firstname, ' ',
> > Employee.middlename, ' ', Employee.lastname) AS firstname")
> > )
>
> > unfortunately, CONCAT operations work well, but cake doesnt recognize
> > them as a proper field. so the values of the returned array is just
> > NULL. i added $displayField in my model but this didnt help.
>
> > is there another way to achieve this?
> > or is it possible to add this functionality in future versions of
> > cakephp :)
>
> > Buggy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---