Initial import
This commit is contained in:
34
application/controllers/tools/Xstatusother.php
Normal file
34
application/controllers/tools/Xstatusother.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user