Implement program parameter management

This commit is contained in:
Eike Foken
2011-08-18 04:16:43 +02:00
parent 2903b367f1
commit c373296953
8 changed files with 343 additions and 42 deletions

View File

@@ -119,19 +119,9 @@ class Program extends CI_Model {
* @return array The parameters
*/
public function getParameters($id) {
$query = $this->db->order_by('order ASC')
$query = $this->db->order_by('sort_number ASC')
->get_where('parameters', array('program_id' => $id));
return $query->result_array();
}
/**
*
* @param string $programId
*/
public function sortParameters($order, $programId) {
foreach ($order as $key => $value) {
$this->db->update('parameters', array('order' => $key), array('id' => $value));
}
}
}