query('SELECT * from m_form_lab where unit_form= \''.$kd_rambulance.'\' and aktif=1'); $arr_form = array(); if($sql->numRows() > 0) { foreach($sql->fetchAll() as $data_form) { $arr_form[$data_form['group_form']][$data_form['jenis_kelompok']][$data_form['form_id']] = $data_form['nama_field']; } } $query_hist = "SELECT * from t_orderambulance_main WHERE NOMR = '{$userdata['nomr']}' and IDXDAFTAR = '$id_admission' and st_aktif = 1 and rajal = 0"; $tmp_hist = $db->query($query_hist); $script_hist = ''; if($tmp_hist) { $jml_hist = $tmp_hist->numRows(); $script_hist = ''; } echo $script_hist; ?>