Add create() and delete() to job model

This commit is contained in:
Karsten Heiken
2011-05-08 20:16:45 +02:00
parent c7f9166b18
commit 1afccc3b9c

View File

@@ -5,6 +5,25 @@
*/ */
class Job extends CI_Model { class Job extends CI_Model {
/**
* Create a new job.
*
* @param array $data the data of the new job
* @return bool was the insert successful
*/
public function create($data) {
return $this->db->insert('jobs', $data);
}
/**
* Delete a job.
* @param string the job id to delete
* @return bool was the deletion successful
*/
public function delete($job_id) {
return $this->db->delete('jobs', array('id' => $job_id));
}
/** /**
* Update the progress of a given job. * Update the progress of a given job.
* *