cake-php@googlegroups.com
[Top] [All Lists]

Re: cannot save multiple checkboxes

Subject: Re: cannot save multiple checkboxes
From: Davor Ilic
Date: Fri, 2 Jul 2010 02:23:28 +0200
Cool thank you man!!!! That´s it :D  ! this is learning by asking with googlegroup :) thank you very much...
I wouldn´t find it because i did not know which issue i had.

thx

2010/7/1 John Andersen <j.andersen.lv@gmail.com>
When you are saving Kattaxonomie in a loop, then you have to use the
create method first.
See http://book.cakephp.org/view/1031/Saving-Your-Data
where you can read about the create method.
Enjoy,
  John

On Jul 1, 6:49 pm, Davor Ilic <webfa...@xxxxxxxxx> wrote:
> hi i want to save with the for loop why because i don´t know how to save
> this in other why to my DB.
>
> i save it like this:
>
>  for($i=0;$i<$counted_katId;$i++) {
>
> $save_product = $this->Kattaxonomie->save($this->Kattaxonomie->set(array(
>
> 'kat_id' => $this->data['Kattaxonomie']['kat_id'][$i],
>
> 'product_id' => $this->Product->id
>
> )));
>
> }
>
> it works but not well because it saves only the last one...

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
<Prev in Thread] Current Thread [Next in Thread>