本文整理汇总了PHP中Konek::getOne方法的典型用法代码示例。如果您正苦于以下问题:PHP Konek::getOne方法的具体用法?PHP Konek::getOne怎么用?PHP Konek::getOne使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Konek
的用法示例。
在下文中一共展示了Konek::getOne方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ON
function get_dokter($id) {
$kon = new Konek;
$kon->sql = "
SELECT
d.id as id,
d.nama as nama,
d.alamat as alamat,
d.telp as telp,
d.aktif as aktif,
sub.id as sub_id,
sub.spesialisasi_id as spc_id
FROM
dokter d
JOIN subspesialisasi sub ON (sub.id = d.subspesialisasi_id)
WHERE
d.id = '".$id."'";
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
$objResponse->addAssign("id_dokter", "value", $data[id]);
$objResponse->addAssign("spesialisasi_id", "value", $data[spc_id]);
$objResponse->addScriptCall("xajax_ref_get_subspesialisasi", "subspesialisasi_id", $data[spc_id], $data[sub_id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("alamat", "value", $data[alamat]);
$objResponse->addAssign("telp", "value", $data[telp]);
$objResponse->addAssign("aktif", "value", $data[aktif]);
$objResponse->addScriptCall("fokus", "spesialisasi_id");
return $objResponse;
}
示例2: ON
function get_tindakan($id, $tingkat, $kelas) {
$kon = new Konek;
if($tingkat) $q .= " AND i.tingkat = '".$tingkat."' ";
if($kelas) $q .= " AND id.kelas = '".$kelas."' ";
$sql = "SELECT
i.id as icid,
id.id as idid,
i.kode as kode,
i.nama as nama,
id.*,
i.jenis_tindakan as jenis_tindakan
FROM
icopim i
LEFT JOIN icopim_detil id ON (id.tingkat = i.tingkat)
WHERE i.id = '".$id."' $q ";
$kon->sql = $sql;
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
//$objResponse->addAssign("debug", "innerHTML", $sql);
$objResponse->addAssign("tindakan_id", "value", $data[jenis_tindakan]);
$objResponse->addAssign("id_icopim", "value", $data[icid]);
$objResponse->addAssign("id_icopim_detil", "value", $data[idid]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("kode", "value", $data[kode]);
$objResponse->addAssign("tingkat", "value", $data[tingkat]);
$objResponse->addAssign("kelas", "value", $data[kelas]);
$objResponse->addAssign("biaya", "value", $data[biaya]);
$objResponse->addScriptCall("fokus", "nama");
return $objResponse;
}
示例3: xajaxResponse
function get_karcis($id) {
$kon = new Konek;
$kon->sql = "SELECT * FROM karcis WHERE id = '".$id."'";
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
/*
$data[$i][kelas],
$data[$i][biaya_bhp],
$data[$i][biaya_jasa],
$data[$i][bhp_p],
$data[$i][bhp_rs],
$data[$i][bhp_rs_adm],
$data[$i][bhp_rs_op],
$data[$i][jasa_p],
$data[$i][jasa_rs],
$data[$i][jasa_rs_op],
$data[$i][jasa_rs_kembang],
$data[$i][jasa_rs_adm],
$data[$i][jasa_rs_sdm],
$data[$i][spesialis],
$data[$i][spesialis_pendamping],
$data[$i][ugp],
$data[$i][grabaf],
$data[$i][perawat],
$data[$i][penunjang],
$data[$i][zakat],
$data[$i][pajak],
$data[$i][netto],
*/
$objResponse->addAssign("id_karcis", "value", $data[id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("jenis", "value", $data[jenis]);
$objResponse->addAssign("kelas", "value", $data[kelas]);
$objResponse->addAssign("biaya_bhp", "value", $data[biaya_bhp]);
$objResponse->addAssign("biaya_jasa", "value", $data[biaya_jasa]);
$objResponse->addAssign("bhp_p", "value", $data[bhp_p]);
$objResponse->addAssign("bhp_rs", "value", $data[bhp_rs]);
$objResponse->addAssign("bhp_rs_adm", "value", $data[bhp_rs_adm]);
$objResponse->addAssign("bhp_rs_op", "value", $data[bhp_rs_op]);
$objResponse->addAssign("jasa_p", "value", $data[jasa_p]);
$objResponse->addAssign("jasa_rs", "value", $data[jasa_rs]);
$objResponse->addAssign("jasa_rs_op", "value", $data[jasa_rs_op]);
$objResponse->addAssign("jasa_rs_kembang", "value", $data[jasa_rs_kembang]);
$objResponse->addAssign("jasa_rs_adm", "value", $data[jasa_rs_adm]);
$objResponse->addAssign("jasa_rs_sdm", "value", $data[jasa_rs_sdm]);
$objResponse->addAssign("spesialis", "value", $data[spesialis]);
$objResponse->addAssign("spesialis_pendamping", "value", $data[spesialis_pendamping]);
$objResponse->addAssign("ugp", "value", $data[ugp]);
$objResponse->addAssign("grabaf", "value", $data[grabaf]);
$objResponse->addAssign("perawat", "value", $data[perawat]);
$objResponse->addAssign("penunjang", "value", $data[penunjang]);
$objResponse->addAssign("zakat", "value", $data[zakat]);
$objResponse->addAssign("pajak", "value", $data[pajak]);
$objResponse->addAssign("netto", "value", $data[netto]);
$objResponse->addScriptCall("fokus", "nama");
return $objResponse;
}
示例4: xajaxResponse
function get_imunisasi($id) {
$objResponse = new xajaxResponse();
$objResponse->addScript("document.getElementById('sebab_sakit_1').checked=false;");
$objResponse->addScript("document.getElementById('sebab_sakit_2').checked=false;");
$objResponse->addScript("document.getElementById('sebab_sakit_3').checked=false;");
$objResponse->addScript("document.getElementById('sebab_sakit_4').checked=false;");
$objResponse->addScript("document.getElementById('sebab_sakit_5').checked=false;");
$objResponse->addScript("document.getElementById('sebab_sakit_6').checked=false;");
$objResponse->addScript("document.getElementById('sebab_sakit_7').checked=false;");
$objResponse->addScript("document.getElementById('sebab_sakit_8').checked=false;");
$kon = new Konek;
$kon->sql = "
SELECT
id as id,
nama as nama,
sebab_sakit as sebab_sakit
FROM
imunisasi
WHERE
id = '".$id."'
GROUP BY id
";
$kon->execute();
$data = $kon->getOne();
$objResponse->addAssign("id_imunisasi", "value", $data[id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$arr_sebab_sakit = explode(",", $data[sebab_sakit]);
if(in_array("Dipteri", $arr_sebab_sakit)) {
$objResponse->addScript("document.getElementById('sebab_sakit_1').checked=true;");
}
if(in_array("Pertusis", $arr_sebab_sakit)) {
$objResponse->addScript("document.getElementById('sebab_sakit_2').checked=true;");
}
if(in_array("Tetanus", $arr_sebab_sakit)) {
$objResponse->addScript("document.getElementById('sebab_sakit_3').checked=true;");
}
if(in_array("Tetanus Neonatorum", $arr_sebab_sakit)) {
$objResponse->addScript("document.getElementById('sebab_sakit_4').checked=true;");
}
if(in_array("TBC Paru", $arr_sebab_sakit)) {
$objResponse->addScript("document.getElementById('sebab_sakit_5').checked=true;");
}
if(in_array("Campak", $arr_sebab_sakit)) {
$objResponse->addScript("document.getElementById('sebab_sakit_6').checked=true;");
}
if(in_array("Polio", $arr_sebab_sakit)) {
$objResponse->addScript("document.getElementById('sebab_sakit_7').checked=true;");
}
if(in_array("Hepatitis", $arr_sebab_sakit)) {
$objResponse->addScript("document.getElementById('sebab_sakit_8').checked=true;");
}
$objResponse->addScriptCall("fokus", "nama");
return $objResponse;
}
示例5: xajaxResponse
function get_pendidikan($id) {
$kon = new Konek;
$kon->sql = "SELECT id, nama FROM ref_pendidikan WHERE id = '".$id."'";
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
$objResponse->addAssign("id_pendidikan", "value", $data[id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addScriptCall("fokus", "nama");
return $objResponse;
}
示例6: xajaxResponse
function get_bhp($id) {
$kon = new Konek;
$kon->sql = "SELECT id, nama, biaya FROM bhp WHERE id = '".$id."'";
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
$objResponse->addAssign("id_bhp", "value", $data[id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("biaya", "value", $data[biaya]);
$objResponse->addScriptCall("fokus", "nama");
return $objResponse;
}
示例7: ON
function get_pasien($id) {
$kon = new Konek;
$sql = "
SELECT p.id as id, p.nama as nama, p.tempat_lahir as tempat_lahir, p.tgl_lahir as tgl_lahir, p.gol_darah as gol_darah, p.alamat as alamat, p.rt as rt, p.rw as rw, p.desa_id as des_id, kec.id as kec_id, kab.id as kab_id, prop.id as prop_id, p.telp as telp, p.agama as agama, p.sex as sex, p.pendidikan_id as pendidikan_id, p.pekerjaan_id as pekerjaan_id, p.status_nikah as status_nikah, p.tgl_daftar as tgl_daftar
FROM pasien p JOIN ref_desa des ON (des.id = p.desa_id) JOIN ref_kecamatan kec ON (kec.id = des.kecamatan_id) JOIN ref_kabupaten kab ON (kab.id = kec.kabupaten_id) JOIN ref_propinsi prop ON (prop.id = kab.propinsi_id)
WHERE p.id = '".$id."'";
$kon->sql = $sql;
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
$objResponse->addScriptCall("show_hide_form", "form_tambah");
$objResponse->addAssign("propinsi_id", "value", $data[prop_id]);
$objResponse->addScriptCall("xajax_ref_get_kabupaten", "kabupaten_id", $data[prop_id], $data[kab_id], true);
$objResponse->addScriptCall("xajax_ref_get_kecamatan", "kecamatan_id", $data[kab_id], $data[kec_id], true);
$objResponse->addScriptCall("xajax_ref_get_desa", "desa_id", $data[kec_id], $data[des_id], true);
$tgl_lahir = explode("-", $data[tgl_lahir]);
$skr = date("Y-m-d");
$usia = hitungUmur($data[tgl_lahir], $skr);
//$objResponse->addAssign("debug", "innerHTML", $tgl_lahir[2] . ":" . $tgl_lahir[1] . ":" . $tgl_lahir[0]);
//jika data ditemukan
if(!empty($data)) {
$objResponse->addAssign("id", "value", $data[id]);
$objResponse->addAssign("id_pasien", "value", $data[id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("usia_tahun", "value", $usia[tahun]);
$objResponse->addAssign("usia_bulan", "value", $usia[bulan]);
$objResponse->addAssign("usia_hari", "value", $usia[hari]);
$objResponse->addAssign("tempat_lahir", "value", $data[tempat_lahir]);
$objResponse->addAssign("tgl_lahir_tgl", "value", $tgl_lahir[2]);
$objResponse->addAssign("tgl_lahir_bln", "value", $tgl_lahir[1]);
$objResponse->addAssign("tgl_lahir_thn", "value", $tgl_lahir[0]);
$objResponse->addAssign("gol_darah", "value", $data[gol_darah]);
$objResponse->addAssign("alamat", "value", $data[alamat]);
$objResponse->addAssign("rt", "value", $data[rt]);
$objResponse->addAssign("rw", "value", $data[rw]);
$objResponse->addAssign("telp", "value", $data[telp]);
$objResponse->addAssign("agama", "value", $data[agama]);
$objResponse->addAssign("sex", "value", $data[sex]);
$objResponse->addAssign("pendidikan_id", "value", $data[pendidikan_id]);
$objResponse->addAssign("pekerjaan_id", "value", $data[pekerjaan_id]);
$objResponse->addAssign("status_nikah", "value", $data[status_nikah]);
$objResponse->addScriptCall("fokus", "nama");
} else {
//jika tidak ada data pasien dengan no rm $id
$objResponse->addScript("document.tambah_pasien.reset()");
$objResponse->addAssign("id", "value", $id);
$objResponse->addScriptCall("fokus", "nama");
}
return $objResponse;
}
示例8: xajaxResponse
function get_pelayanan($id) {
$kon = new Konek;
$kon->sql = "SELECT * FROM pelayanan WHERE id = '".$id."'";
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
$objResponse->addAssign("id_pelayanan", "value", $data[id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("spesialisasi_id", "value", $data[spesialisasi_id]);
$objResponse->addAssign("hari_buka", "value", $data[hari_buka]);
$objResponse->addScriptCall("fokus", "nama");
return $objResponse;
}
示例9: xajaxResponse
function get_icd($id) {
$kon = new Konek;
$kon->sql = "SELECT * FROM icd WHERE id = '".$id."'";
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
$objResponse->addAssign("id_icd", "value", $data[id]);
$objResponse->addAssign("kode_icd_group", "value", $data[kode_icd_group]);
$objResponse->addAssign("kode_icd", "value", $data[kode_icd]);
$objResponse->addAssign("no_dtd", "value", $data[no_dtd]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("gol_sebab_sakit", "value", $data[gol_sebab_sakit]);
$objResponse->addScriptCall("fokus", "kode_icd_group");
return $objResponse;
}
示例10: getPasien
function getPasien($pasien_id = null) {
if(!$pasien_id) $pasien_id = $this->pasien_id;
$kon = new Konek;
$kon->sql = "
SELECT
CONCAT_WS('-', SUBSTRING(p.id, 1,2), SUBSTRING(p.id, 3,2), SUBSTRING(p.id, 5,2), SUBSTRING(p.id, 7,2)) as no_rm,
REPLACE((p.nama), ('".$val[cari_nama]."'), ('<b>".$val[cari_nama].
"</b>')) as nama,
CONCAT(p.alamat, ' ', 'RT ', p.rt, '/ RW ', p.rw, '<br />',des.nama, ', ', kec.nama, ', ', kab.nama, '<br />', prop.nama) as alamat
FROM
pasien p
JOIN ref_desa des ON (des.id = p.desa_id)
JOIN ref_kecamatan kec ON (kec.id = des.kecamatan_id)
JOIN ref_kabupaten kab ON (kab.id = kec.kabupaten_id)
JOIN ref_propinsi prop ON (prop.id = kab.propinsi_id)
WHERE
p.id = '".$pasien_id."'
";
$kon->execute();
$data = $kon->getOne();
return $data;
}
示例11: ON
function get_kecamatan($id) {
$kon = new Konek;
$kon->sql = "
SELECT
kec.id as id,
kec.nama as nama,
k.id as kab_id,
k.propinsi_id as prop_id
FROM
ref_kecamatan kec
JOIN ref_kabupaten k ON (k.id = kec.kabupaten_id)
WHERE
kec.id = '".$id."'";
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
$objResponse->addAssign("id_kecamatan", "value", $data[id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("propinsi_id", "value", $data[prop_id]);
$objResponse->addScriptCall("xajax_get_kabupaten", $data[prop_id], $data[kab_id]);
$objResponse->addScriptCall("fokus", "nama");
return $objResponse;
}
示例12: ON
function get_lab($id) {
$kon = new Konek;
$kon->sql = "
SELECT
ls.id as id,
ls.nama as nama,
ls.biaya_bhp as biaya_bhp,
lsd.biaya_jasa as biaya_jasa,
lsd.kelas as kelas
FROM
lab_specimen ls
JOIN lab_specimen_detil lsd ON (lsd.tingkat = ls.tingkat)
WHERE
ls.id = '".$id."'";
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
$objResponse->addAssign("id", "value", $data[id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("biaya_bhp", "value", $data[biaya_bhp]);
$objResponse->addAssign("biaya_jasa", "value", $data[biaya_jasa]);
$objResponse->addAssign("kelas", "value", $data[kelas]);
return $objResponse;
}
示例13: ON
function get_radio($id) {
$kon = new Konek;
$kon->sql = "
SELECT
rp.id as id,
rp.nama as nama,
rp.biaya_bhp as biaya_bhp,
rpd.biaya_jasa as biaya_jasa,
rpd.kelas as kelas
FROM
radio_pemeriksaan rp
JOIN radio_pemeriksaan_detil rpd ON (rpd.tingkat = rp.tingkat)
WHERE
rp.id = '".$id."'";
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse();
$objResponse->addAssign("id", "value", $data[id]);
$objResponse->addAssign("nama", "value", $data[nama]);
$objResponse->addAssign("biaya_bhp", "value", $data[biaya_bhp]);
$objResponse->addAssign("biaya_jasa", "value", $data[biaya_jasa]);
$objResponse->addAssign("kelas", "value", $data[kelas]);
return $objResponse;
}
示例14: DATE
function get_no_antrian($val) {
$tgl_periksa = $val[tgl_periksa_thn]."-".$val[tgl_periksa_bln]."-".$val[tgl_periksa_tgl];
if($val[dokter_id]) $s = " AND dokter_id = '".$val[dokter_id]."' ";
else $s = " AND dokter_id IS NULL ";
$kon = new Konek;
$sql = "
SELECT
CASE
WHEN (MAX(no_antrian) IS NULL) THEN '1'
ELSE (MAX(no_antrian) + 1)
END AS no_antrian
FROM
kunjungan_kamar
WHERE
kamar_id = '".$val[kamar_id]."'
AND DATE(tgl_periksa) = '".$tgl_periksa."'
$s
";
$kon->sql = $sql;
$kon->execute();
$data = $kon->getOne();
$objResponse = new xajaxResponse;
$objResponse->addClear("tr_no_antrian", "style.display");
$objResponse->addAssign("div_no_antrian", "innerHTML", $data[no_antrian]);
$objResponse->addAssign("no_antrian", "value", $data[no_antrian]);
return $objResponse;
}
示例15: SUBSTRING
function buka_daftar_penunjang($idkk) {
$kon = new Konek;
$objResponse = new xajaxResponse;
$kon->sql = "
SELECT
CONCAT_WS('-', SUBSTRING(p.id, 1,2), SUBSTRING(p.id, 3,2), SUBSTRING(p.id, 5,2), SUBSTRING(p.id, 7,2)) as no_rm,
p.nama as nama,
p.sex as sex,
d.nama as dokter
FROM
kunjungan k
JOIN pasien p ON (p.id = k.pasien_id)
JOIN kunjungan_kamar kk ON (kk.kunjungan_id = k.id)
LEFT JOIN dokter d ON (d.id = kk.dokter_id)
WHERE
kk.id = '".$idkk."'
";
$kon->execute();
$data = $kon->getOne();
$objResponse->addAssign("dp_no_rm", "innerHTML", $data[no_rm]);
$objResponse->addAssign("dp_nama", "innerHTML", $data[nama]);
$objResponse->addAssign("dp_sex", "innerHTML", $data[sex]);
$objResponse->addAssign("dp_pengirim", "value", $data[dokter]);
return $objResponse;
}