Is your foreign key in Moveigenre really genreid? If yes, then it does not comply with what CakePHP expects! Try to rename it to genre_id Enjoy, John
On Apr 7, 10:56 am, Ranjana Sriavastava <[email protected]> wrote: > already try that.but i am unable to do that trough this method > > On Mon, Apr 6, 2009 at 9:25 PM, jsundquist <[email protected]> wrote: > > > You should be able just do a $this->Moviegenre->save($this->data) > > > The save function will loop through your array and save all the data > > into the correct fields along with the value set by your check box. > > > On Apr 6, 4:10 am, Ranju <[email protected]> wrote: > > > hello i want to insert multiple chekbox values... > > > > View File > > > > <?php echo $form->input('Moviegenre.genreid[]',array('label'=>false, > > > 'type'=>'checkbox','multiple'=>true,'value'=>$genre['Genre']['id'])); ? > > > > Controllercode > > > > $genreid= $this->data['Moviegenre']['genreid']; > > > > foreach($genreid as $key => $value) > > > { > > > $query = "insert into > > moviegenres(genreid)values($value)"; > > > $update = $this->Moviegenre->query($query); > > > > } > > > > Its not work --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
