You can always add stuff to the array and re-save it with the same
id.  This overwrites the old data.  Is this what you are looking for?

$this->data['User']['new_field'] = 2;
$this->User->save($this->data);

On Nov 30, 4:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm very new to cakephp and I'm trying to figure out how related
> tables work. Here's my question. Say I have a list of message boards
> that have users connected to them in the Calendar model with the
> $hasMany variable. Now, say each calendar has a contact field that
> holds an email address. Whenever I add a new calendar, I want to also
> add a new user from a calendars_controller.php function with the email
> address from the contact field of the calendar and the calendar's id
> in the calendar_id field of a user. How do I do this?
>
> I can figure out how to read all of the users associated with a
> calendar in the calendars_controller, but I can't for the life of me,
> figure out how to add new data in the users table from the
> calendar_controller. Anyone have any insight?
>
> Thanks, Dave
--~--~---------~--~----~------------~-------~--~----~
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