Thanks all.

I did more googling and ended up replacing the generateList() stuff
with
        $l = $this->User->Usertype->find('all', array('fields' =>
array('Usertype.id', 'Usertype.choice')));
        $result = Set::combine($l, "{n}.Usertype.id",
"{n}.Usertype.choice");
        $this->set('usertypes', $result);

I did put this as one line as well....but it gets messy (but does
work!)

        //$this->set('usertypes',  Set::combine($this->User->Usertype-
>find('all', array('fields' => array('Usertype.id',
'Usertype.choice'))), "{n}.Usertype.id", "{n}.Usertype.choice"));


I'm used to doing a little programming so I think I was trying to run
before I understood the power of the bakery.

Thanks again for your responses

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