Skip to content

Instantly share code, notes, and snippets.

@sebbdk
Created March 28, 2012 14:11
Show Gist options
  • Save sebbdk/2226493 to your computer and use it in GitHub Desktop.
Save sebbdk/2226493 to your computer and use it in GitHub Desktop.
public function admin_add(){
if($this->request->is('post')) {
//$dataSource = $this->MapPoint->getDataSource();
//$dataSource->begin($this->MapPoint);
$this->MapPoint->deleteAll(array(
'MapPoint.map_id' => $this->data[0]['MapPoint']['map_id']
));
die("test!");
if($this->MapPoint->saveAll($this->data)) {
$dataSource->commit($this->MapPoint);
} else {
$dataSource->rollback($this->MapPoint);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment