load->library('session'); $this->load->library('rhlib'); } function retValOrNull($val){ //especially for combo & looukup with no item selected $val = ($val=='')? null : $val; return $val; } function retValOrZero($val){ $val = ($val=='')? 0 : $val; return $val; } function get_jadwaluj(){ $kdprodi = $_POST['kdprodi']; $kdstsemester = $_POST['kdstsemester']; $idjnsujian = $_POST['idjnsujian']; $q = "SELECT v_jadwalujian.*, concat(v_jadwalujian.mulai,' - ',v_jadwalujian.selesai) as waktu FROM v_jadwalujian WHERE kdprodi='".$kdprodi."' and kdstsemester='".$kdstsemester."' and idjnsujian='".$idjnsujian."' ORDER BY tglujian, concat(mulai, ' - ', selesai)"; $this->rhlib->jsonFromQuery($q); } } ?>