My application has two tables: Lessons, Users.  Users hasMany Lessons
and Lessons belongsTo Users.

I'm trying to make a selectTag menu but I'm having problems getting
the generateList function to work... here's the code I'm using within
the lessons_controller.

$this->set('authorArray', $this->Lesson->User->generateList(null,
null, null, '{n}.User.user_id', '{n}.User.username'));

Rather than returning the entire array of usernames, which I want, the
selectTag menu only has one option.

I know the code I'm using in the view is functional because I've made
a number of selectTag menus using fields within the Lessons table, but
I'm baffled as to how to extract an entire column from the Users table
in order to generate a list.

I would like to have the controller do this without having to change
the model relationships to a hadAndBelongsToMany type.   Any advice?


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