http://groups.google.com/group/cake-php/browse_thread/thread/fb6b71db2de8392d/7fe9e8fa9252f234
I realize this may be a bit of a sore point (after reading the post
above) but I think I'm retarded and missing something obvious... Bare
with me please - this is my second day using any PHP Framework.
I'm writing a webapp to keep track of members and training records etc
for fire brigades. I have a table of Members (fire fighters) and a
table of Brigades. Each member belongsTo a Brigade (I have that
relationship setup in my Model).
On my members/edit view, I need a select list for all the Brigades in
the database, but I can't figure out how to do it. Looking at the post
I linked at the top of this, I need to do something along the lines
of:
$brigades = $this->Brigade->find('name');
$this->set(compact('brigades'));
I don't understand the second line, and I don't know where I should be
putting that. I tried putting it in my edit function in the Members
Controller, but it throws me back an Undefined Property error.
I understand that the current value ONLY will be passed in the POST,
but I just can't figure out how to build the rest of the options from
the values in the Database table.
Can someone please point me back on track?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---