Skip to content

Instantly share code, notes, and snippets.

@henrikbjorn
Created February 4, 2010 13:59
Show Gist options
  • Save henrikbjorn/294645 to your computer and use it in GitHub Desktop.
Save henrikbjorn/294645 to your computer and use it in GitHub Desktop.
$this->Quiz->saveAll($this->data['Quiz'], array('validate' => 'first'));
$quizId = $this->Quiz->id;
foreach($this->data['QuizQuestion'] as $data){
$data['quiz_id'] = $quizId;
$this->Quiz->QuizQuestion->saveAll($data, array('validate' => 'first'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment