Add create() and delete() to configuration model

This commit is contained in:
Karsten Heiken
2011-05-08 20:20:58 +02:00
parent 1afccc3b9c
commit 628b273954

View File

@@ -7,6 +7,25 @@
*/ */
class Configuration extends CI_Model { class Configuration extends CI_Model {
/**
* Create a new configuration.
*
* @param array $data the data of the new configuration
* @return bool was the insert successful
*/
public function create($data) {
return $this->db->insert('configurations', $data);
}
/**
* Delete a configuration.
* @param string the configuration id to delete
* @return bool was the deletion successful
*/
public function delete($configuration_id) {
return $this->db->delete('configurations', array('id' => $configuration_id));
}
/** /**
* Get a configuration by id. * Get a configuration by id.
* *