Implement detail page for experiments
This commit is contained in:
@@ -66,6 +66,22 @@ class Job extends CI_Model {
|
||||
return $this->db->where('id', $job_id)->update('jobs', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a specific job.
|
||||
*
|
||||
* @param string $experimentId
|
||||
* @return array The job data
|
||||
*/
|
||||
public function getByExperimentId($experimentId) {
|
||||
$this->db->select('jobs.*, users.username, users.firstname, users.lastname');
|
||||
$this->db->join('users', 'jobs.started_by = users.id', 'left');
|
||||
$this->db->where('experiment_id', $experimentId);
|
||||
|
||||
$query = $this->db->get('jobs');
|
||||
|
||||
return $query->row_array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of recent jobs.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user