Skip to content

Instantly share code, notes, and snippets.

@jamesfinley
Created July 2, 2011 14:40
Show Gist options
  • Select an option

  • Save jamesfinley/1060541 to your computer and use it in GitHub Desktop.

Select an option

Save jamesfinley/1060541 to your computer and use it in GitHub Desktop.
$modules = $this->input->post('modules');
$this->db->where('page_id', $page->id)->delete('page_modules');
if ($modules)
{
foreach ($modules as $key=>$value)
{
$this->page_module_model->create(array(
'page_id' => $page->id,
'module_id' => $key
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment