35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
<?php
|
|
class Xstatusother extends MY_Controller
|
|
{
|
|
function __construct() {
|
|
parent::__construct();
|
|
$this->db = $this->load->database("onedev", true);
|
|
}
|
|
function index() {
|
|
echo "API";
|
|
}
|
|
function update() {
|
|
$prm = $this->sys_input;
|
|
$T_OrderDetailID = $prm["T_OrderDetailID"];
|
|
$sql = "select * from other_mikro where Other_MikroT_OrderDetailID = ?";
|
|
$qry = $this->db->query($sql, array($T_OrderDetailID));
|
|
if (! $qry ) {
|
|
echo json_encode(array("status"=>"ERR", "message" => print_r($this->db->error(),true) ));
|
|
return;
|
|
}
|
|
$rows = $qry->result_array();
|
|
if (count($rows) == 0 ) {
|
|
$sql = "insert into other_mikro(Other_MikroT_OrderDetailID,Other_MikroM_DoctorID,
|
|
Other_MikroResult, Other_MikroT_BacteriaID, Other_MikroSampleTypeName,
|
|
Other_MikroHasilBiakan,Other_MikroUserID)
|
|
values(?,?, ?,?,?, ?,?)";
|
|
|
|
return;
|
|
}
|
|
|
|
if (count($rows) > 0 ) {
|
|
$bateria
|
|
}
|
|
}
|
|
}
|