Re: Update two models with one form

2007-05-16 Thread gerbenzomp

Sorry, my actual question is:

How to update another model's table when there is no association
between them?



On 16 mei, 03:57, Pento [EMAIL PROTECTED] wrote:
 So what problem to use for names of input elements of the form names
 like
 Users/field1,Sites/field1 and in controller call save methods for
 both models?

 On 16 май, 07:33, gerbenzomp [EMAIL PROTECTED] wrote:

  I have a form where users can register (model: users), but they should
  also be able to create a sitename (model: sites) in that same form.
  How should I approach this?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Update two models with one form

2007-05-16 Thread Tulio Faria

You can use:
$this-Model1-save($this-data);
$this-Model2-save($this-data);

and in the controller:

var $uses = array(Model1, Model2);

best,

On 16 maio, 10:26, gerbenzomp [EMAIL PROTECTED] wrote:
 Sorry, my actual question is:

 How to update another model's table when there is no association
 between them?

 On 16 mei, 03:57, Pento [EMAIL PROTECTED] wrote:

  So what problem to use for names of input elements of the form names
  like
  Users/field1,Sites/field1 and in controller call save methods for
  both models?

  On 16 май, 07:33, gerbenzomp [EMAIL PROTECTED] wrote:

   I have a form where users can register (model: users), but they should
   also be able to create a sitename (model: sites) in that same form.
   How should I approach this?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Update two models with one form

2007-05-15 Thread Pento

So what problem to use for names of input elements of the form names
like
Users/field1,Sites/field1 and in controller call save methods for
both models?

On 16 май, 07:33, gerbenzomp [EMAIL PROTECTED] wrote:
 I have a form where users can register (model: users), but they should
 also be able to create a sitename (model: sites) in that same form.
 How should I approach this?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---