591 lines
17 KiB
PHP
Executable File
591 lines
17 KiB
PHP
Executable File
<?php
|
|
class Methodepriority extends MY_Controller
|
|
{
|
|
var $db_onedev;
|
|
public function index()
|
|
{
|
|
echo "Methode Priority API";
|
|
}
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->db_onedev = $this->load->database("onedev", true);
|
|
}
|
|
|
|
public function search()
|
|
{
|
|
$prm = $this->sys_input;
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$code = $prm["code"];
|
|
$nama = $prm["nama"];
|
|
|
|
// echo $norm;
|
|
|
|
$sql_where = "WHERE Nat_TestIsActive = 'Y'";
|
|
$sql_param = array();
|
|
if ($code != "") {
|
|
if ($sql_where != "") {
|
|
$sql_where .=" and ";
|
|
}
|
|
$sql_where .= " Nat_TestCode like ? ";
|
|
$sql_param[] = "%$code%";
|
|
}
|
|
if ($nama != "") {
|
|
if ($sql_where != "") {
|
|
$sql_where .=" and ";
|
|
}
|
|
$sql_where .= " Nat_TestName like ? ";
|
|
$sql_param[] = "%$nama%";
|
|
}
|
|
|
|
//if ($sql_where != "") $sql_where .= " and ";
|
|
|
|
// Order masih dalam status registrasi
|
|
//$sql_where .= " M_PatientIsActive = 'Y' ";
|
|
|
|
|
|
$sql = " SELECT count(*) as total
|
|
FROM nat_test
|
|
$sql_where
|
|
";
|
|
//echo $sql;
|
|
$query = $this->db_onedev->query($sql, $sql_param);
|
|
|
|
$tot_count = 0;
|
|
if ($query) {
|
|
$tot_count = $query->result_array()[0]["total"];
|
|
} else {
|
|
$this->sys_error_db("nat_test count", $this->db_onedev);
|
|
exit;
|
|
}
|
|
|
|
$sql = "SELECT *
|
|
FROM nat_test
|
|
JOIN m_instrumentmethode ON M_InstrumentMethodeNat_TestID = Nat_TestID
|
|
$sql_where
|
|
GROUP BY Nat_TestID
|
|
ORDER BY Nat_TestCode ASC";
|
|
//echo $sql;
|
|
$query = $this->db_onedev->query($sql, $sql_param);
|
|
$rows = $query->result_array();
|
|
if($rows){
|
|
foreach($rows as $k => $v){
|
|
|
|
}
|
|
}
|
|
|
|
|
|
//$this->_add_address($rows);
|
|
$result = array("total" => $tot_count, "records" => $rows, "sql"=> $this->db_onedev->last_query());
|
|
$this->sys_ok($result);
|
|
exit;
|
|
|
|
}
|
|
|
|
function searchcompany(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$prm = $this->sys_input;
|
|
|
|
$max_rst = 12;
|
|
$tot_count =0;
|
|
|
|
$q = [
|
|
'search' => '%'
|
|
];
|
|
|
|
if ($prm['search'] != '')
|
|
{
|
|
$q['search'] = "%{$prm['search']}%";
|
|
}
|
|
|
|
// QUERY TOTAL
|
|
$sql = "SELECT count(*) as total
|
|
FROM m_company
|
|
WHERE
|
|
M_CompanyName like ?
|
|
AND M_CompanyIsActive = 'Y' AND M_CompanyIsLabFrom = 'Y'";
|
|
$query = $this->db_onedev->query($sql,$q['search']);
|
|
//echo $query;
|
|
if ($query) {
|
|
$tot_count = $query->result_array()[0]["total"];
|
|
}
|
|
else {
|
|
$this->sys_error_db("m_company count",$this->db_onedev);
|
|
exit;
|
|
}
|
|
|
|
$sql = "
|
|
SELECT *
|
|
FROM m_company
|
|
WHERE
|
|
M_CompanyName like ?
|
|
AND M_CompanyIsActive = 'Y' AND M_CompanyIsLabFrom = 'Y'
|
|
ORDER BY M_CompanyName DESC
|
|
";
|
|
$query = $this->db_onedev->query($sql, array($q['search']));
|
|
|
|
if ($query) {
|
|
$rows = $query->result_array();
|
|
//echo $this->db_onedev->last_query();
|
|
$result = array("total" => $tot_count, "records" => $rows, "total_display" => sizeof($rows));
|
|
$this->sys_ok($result);
|
|
}
|
|
else {
|
|
$this->sys_error_db("m_company rows",$this->db_onedev);
|
|
exit;
|
|
}
|
|
}
|
|
function getmou(){
|
|
$prm = $this->sys_input;
|
|
$query =" SELECT *
|
|
FROM m_mou
|
|
WHERE
|
|
M_MouIsActive = 'Y' AND M_MouM_CompanyID = ?
|
|
";
|
|
//echo $query;
|
|
$rows = $this->db_onedev->query($query,array($prm['id']))->result_array();
|
|
|
|
$result = array(
|
|
"total" => count($rows) ,
|
|
"records" => $rows,
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
function getmethodereg(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$rows = [];
|
|
$query =" SELECT *
|
|
FROM nat_methode
|
|
WHERE
|
|
Nat_MethodeIsActive = 'Y'
|
|
";
|
|
//echo $query;
|
|
$rows['methodees'] = $this->db_onedev->query($query)->result_array();
|
|
|
|
$result = array(
|
|
"total" => count($rows) ,
|
|
"records" => $rows,
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
|
|
function save(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$prm = $this->sys_input;
|
|
$pdob = date('Y-m-d',strtotime($prm['M_PatientDOB']));
|
|
$query ="UPDATE m_patient SET
|
|
M_PatientM_TitleID = '{$prm['M_PatientM_TitleID']}',
|
|
M_PatientName = '{$prm['M_PatientName']}',
|
|
M_PatientDOB = '{$pdob}',
|
|
M_PatientM_SexID = '{$prm['M_PatientM_SexID']}',
|
|
M_PatientM_ReligionID = '{$prm['M_PatientM_ReligionID']}',
|
|
M_PatientEmail = '{$prm['M_PatientEmail']}',
|
|
M_PatientHP = '{$prm['M_PatientHP']}',
|
|
M_PatientPhone = '{$prm['M_PatientPhone']}',
|
|
M_PatientM_IdTypeID = '{$prm['M_PatientM_IdTypeID']}',
|
|
M_PatientIDNumber = '{$prm['M_PatientIDNumber']}',
|
|
M_PatientNote = '{$prm['M_PatientNote']}'
|
|
WHERE
|
|
M_PatientID = '{$prm['M_PatientID']}'
|
|
";
|
|
//echo $query;
|
|
$rows = $this->db_onedev->query($query);
|
|
|
|
$result = array(
|
|
"total" => 1 ,
|
|
"records" => array('status'=>'OK')
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
|
|
function newreceivereference(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$prm = $this->sys_input;
|
|
$pdate = date('Y-m-d',strtotime($prm['sdate']));
|
|
$userid = $this->sys_user["M_UserID"];
|
|
$query ="INSERT INTO nat_test (
|
|
Nat_TestM_CompanyID,
|
|
Nat_TestM_MouID,
|
|
Nat_TestDate,
|
|
Nat_TestNote,
|
|
Nat_TestUserID,
|
|
Nat_TestCreated
|
|
)
|
|
VALUES(
|
|
'{$prm['companyid']}',
|
|
'{$prm['mouid']}',
|
|
'{$pdate}',
|
|
'{$prm['note']}',
|
|
'{$userid}',
|
|
NOW()
|
|
)
|
|
";
|
|
// echo $query;
|
|
$rows = $this->db_onedev->query($query);
|
|
$last_id = $this->db_onedev->insert_id();
|
|
|
|
$querylog ="INSERT INTO g_receivereferenceheaderstatuslog (
|
|
G_ReceiveReferenceHeaderStatusLogDate,
|
|
G_ReceiveReferenceHeaderStatusLogNat_TestID,
|
|
G_ReceiveReferenceHeaderStatusLogM_StatusReferenceID,
|
|
G_ReceiveReferenceHeaderStatusLogM_UserID,
|
|
G_ReceiveReferenceHeaderStatusLogUserID,
|
|
G_ReceiveReferenceHeaderStatusLogCreated,
|
|
G_ReceiveReferenceHeaderStatusLogLastUpdated
|
|
)
|
|
VALUES(
|
|
NOW(),
|
|
'{$last_id}',
|
|
'1',
|
|
'{$userid}',
|
|
'{$userid}',
|
|
NOW(),
|
|
NOW()
|
|
)";
|
|
//echo $querylog;
|
|
$insert_new_log = $this->db_onedev->query($querylog);
|
|
$result = array(
|
|
"total" => 1 ,
|
|
"records" => array('status'=>'OK'),
|
|
"id" => $last_id
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
function sendorder(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$prm = $this->sys_input;
|
|
$userid = $this->sys_user["M_UserID"];
|
|
|
|
$query ="UPDATE nat_test SET
|
|
Nat_TestIsSent = 'Y',
|
|
Nat_TestSentDate = now(),
|
|
Nat_TestUserID = '{$userid}'
|
|
WHERE
|
|
Nat_TestID = '{$prm['Nat_TestID']}'
|
|
";
|
|
//echo $query;
|
|
$rows = $this->db_onedev->query($query);
|
|
|
|
$rows = $this->db_onedev->query($query);
|
|
|
|
$querylog ="INSERT INTO g_receivereferenceheaderstatuslog (
|
|
G_ReceiveReferenceHeaderStatusLogDate,
|
|
G_ReceiveReferenceHeaderStatusLogNat_TestID,
|
|
G_ReceiveReferenceHeaderStatusLogM_StatusReferenceID,
|
|
G_ReceiveReferenceHeaderStatusLogM_UserID,
|
|
G_ReceiveReferenceHeaderStatusLogUserID,
|
|
G_ReceiveReferenceHeaderStatusLogCreated,
|
|
G_ReceiveReferenceHeaderStatusLogLastUpdated
|
|
)
|
|
VALUES(
|
|
NOW(),
|
|
'{$prm['Nat_TestID']}',
|
|
'2',
|
|
'{$userid}',
|
|
'{$userid}',
|
|
NOW(),
|
|
NOW()
|
|
)";
|
|
//echo $querylog;
|
|
$insert_new_log = $this->db_onedev->query($querylog);
|
|
$result = array(
|
|
"total" => 1 ,
|
|
"records" => array('status'=>'OK')
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
function getmethode(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$prm = $this->sys_input;
|
|
$query =" SELECT Nat_MethodeID,
|
|
Nat_MethodeName,
|
|
Nat_TestName,
|
|
IFNULL(GROUP_CONCAT(DISTINCT M_DayOfWeekName ORDER BY M_DayOfWeekID ASC SEPARATOR ', '),'No Local Setting') as M_DayOfWeekName,
|
|
GROUP_CONCAT(DISTINCT Nat_InstrumentName SEPARATOR ', ') as Nat_InstrumentName,
|
|
M_MethodePriorityNumber,
|
|
'xxx' as days,
|
|
'' as action
|
|
FROM nat_test
|
|
JOIN nat_normalvalue ON Nat_TestID = Nat_NormalValueNat_TestID
|
|
JOIN nat_methode ON Nat_NormalValueNat_MethodeID = Nat_MethodeID
|
|
JOIN m_instrumentmethode ON M_InstrumentMethodeNat_TestID = Nat_TestID AND M_InstrumentMethodeNat_MethodeID = Nat_MethodeID AND M_InstrumentMethodeIsActive = 'Y'
|
|
JOIN nat_instrument ON M_InstrumentMethodeNat_InstrumentID = Nat_InstrumentID
|
|
LEFT JOIN m_methode_priority ON M_MethodePriorityNat_TestID = Nat_TestID AND M_MethodePriorityNat_MethodeID = Nat_MethodeID AND M_MethodePriorityIsActive = 'Y'
|
|
LEFT JOIN m_dayofweek ON M_MethodePriorityM_DayOfWeekID = M_DayOfWeekID
|
|
WHERE
|
|
Nat_TestID = ?
|
|
GROUP BY Nat_MethodeID
|
|
ORDER BY Nat_MethodeID ASC
|
|
";
|
|
//echo $query;
|
|
$rows = $this->db_onedev->query($query,array($prm['id']))->result_array();
|
|
if($rows){
|
|
|
|
foreach($rows as $k => $v){
|
|
$x = $this->db_onedev->query("select concat( '[', group_concat( json_object('id',IFNULL(M_MethodePriorityID,M_DayOfWeekID), 'dayname', M_DayOfWeekName,'prioritas', M_MethodePriorityNumber ,'status', IF(IFNULL(M_MethodePriorityNumber,0) = 0, 'N','Y')) separator ',' ), ']' )
|
|
as n FROM
|
|
(SELECT M_MethodePriorityID,M_DayOfWeekID,M_DayOfWeekName,IFNULL(M_MethodePriorityNumber,0) as M_MethodePriorityNumber
|
|
FROM m_dayofweek
|
|
JOIN nat_test ON Nat_TestID = '{$prm['id']}'
|
|
JOIN nat_normalvalue ON Nat_TestID = Nat_NormalValueNat_TestID AND Nat_NormalValueNat_MethodeID = '{$v['Nat_MethodeID']}'
|
|
JOIN nat_methode ON Nat_NormalValueNat_MethodeID = Nat_MethodeID
|
|
LEFT JOIN m_methode_priority ON Nat_TestID = M_MethodePriorityNat_TestID AND Nat_MethodeID = M_MethodePriorityNat_MethodeID AND M_DayOfWeekID = M_MethodePriorityM_DayOfWeekID AND M_MethodePriorityIsActive = 'Y'
|
|
GROUP BY M_DayOfWeekID) a")->row();
|
|
$rows[$k]['dayx'] = json_decode($x->n);
|
|
$rows[$k]['days'] = $this->add_day($prm['id'],$v['Nat_MethodeID']);
|
|
$rows[$k]['action'] = '<v-icon color="error" @click="deleteAddress(props.item)">delete</v-icon>';
|
|
$rows[$k]['action'] .= '<v-icon color="primary" @click="deleteAddress(props.item)">edit</v-icon>';
|
|
|
|
}
|
|
}
|
|
$result = array(
|
|
"total" => count($rows) ,
|
|
"records" => $rows,
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
function add_day($testid,$methodeid){
|
|
$query =" SELECT m_methode_priority.*,IFNULL(M_MethodePriorityNumber,0) as M_MethodePriorityNumber, m_dayofweek.*,IF(M_MethodePriorityID IS NULL,'N','Y') as isday, IFNULL(M_MethodePriorityNat_MethodeID,0) as xid
|
|
FROM m_dayofweek
|
|
JOIN nat_test ON Nat_TestID = '{$testid}'
|
|
JOIN nat_normalvalue ON Nat_TestID = Nat_NormalValueNat_TestID AND Nat_NormalValueNat_MethodeID = '{$methodeid}'
|
|
JOIN nat_methode ON Nat_NormalValueNat_MethodeID = Nat_MethodeID
|
|
LEFT JOIN m_methode_priority ON Nat_TestID = M_MethodePriorityNat_TestID AND Nat_MethodeID = M_MethodePriorityNat_MethodeID AND M_DayOfWeekID = M_MethodePriorityM_DayOfWeekID AND M_MethodePriorityIsActive = 'Y'
|
|
GROUP BY M_DayOfWeekID";
|
|
//echo $query;
|
|
$rows = $this->db_onedev->query($query)->result_array();
|
|
if(!$rows)
|
|
$rows = array();
|
|
return $rows;
|
|
}
|
|
|
|
function savenewmethode(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$prm = $this->sys_input;
|
|
$userid = $this->sys_user["M_UserID"];
|
|
foreach($prm['orderdays'] as $k=>$v){
|
|
$query = "INSERT INTO m_methode_priority (
|
|
M_MethodePriorityM_MethodePriorityID,
|
|
M_MethodePriorityT_TestID,
|
|
M_MethodePriorityT_TestCode,
|
|
M_MethodePriorityT_TestName,
|
|
M_MethodePriorityT_TestPrice,
|
|
M_MethodePriorityT_TestDisc,
|
|
M_MethodePriorityT_TestDiscRp,
|
|
M_MethodePriorityT_TestTotal,
|
|
M_MethodePriorityUserID,
|
|
M_MethodePriorityCreated,
|
|
M_MethodePriorityLastUpdated
|
|
)
|
|
VALUE(
|
|
?,?,?,?,?,?,?,?,?, now(),now()
|
|
)";
|
|
$insert_new_test = $this->db_onedev->query($query,array(
|
|
$orderpatient_id,
|
|
$v['T_TestID'],
|
|
$v['T_TestCode'],
|
|
$v['T_TestName'],
|
|
$v['T_PriceAmount'],
|
|
$v['T_PriceDisc'],
|
|
$v['T_PriceDiscRp'],
|
|
$v['total'],
|
|
$userid
|
|
));
|
|
}
|
|
$result = array(
|
|
"total" => 1 ,
|
|
"records" => array('status'=>'OK')
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
|
|
function saveeditmethode(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$prm = $this->sys_input;
|
|
$test_id = $prm['M_MethodePriorityNat_TestID'];
|
|
$methode_id = $prm['M_MethodePriorityNat_MethodeID'];
|
|
$priority = $prm['M_MethodePriorityNumber'];
|
|
$userid = $this->sys_user["M_UserID"];
|
|
|
|
foreach($prm['orderdays'] as $k=>$v){
|
|
if(($v['xid'] == 0 || $v['xid'] == '0') && ($v['isday'] === 'Y')){
|
|
$query = "INSERT INTO m_methode_priority(
|
|
M_MethodePriorityNat_TestID,
|
|
M_MethodePriorityNat_MethodeID,
|
|
M_MethodePriorityM_DayOfWeekID,
|
|
M_MethodePriorityNumber,
|
|
M_MethodePriorityUserID,
|
|
M_MethodePriorityCreated,
|
|
M_MethodePriorityLastUpdated
|
|
)
|
|
VALUE(
|
|
?,?,?,?,?,now(),now()
|
|
)";
|
|
$insert_methode = $this->db_onedev->query($query,array(
|
|
$test_id,
|
|
$methode_id,
|
|
$v['M_DayOfWeekID'],
|
|
$priority,
|
|
$userid
|
|
));
|
|
}elseif($v['xid'] > 0 && $v['isday'] === 'N'){
|
|
$queryupdate ="UPDATE m_methode_priority SET
|
|
M_MethodePriorityIsActive = 'N',
|
|
M_MethodePriorityUserID = '{$userid}',
|
|
M_MethodePriorityLastUpdated = now()
|
|
WHERE
|
|
M_MethodePriorityID = ?
|
|
";
|
|
// echo $queryupdate;
|
|
$update_methode = $this->db_onedev->query($queryupdate,array($v['M_MethodePriorityID'],));
|
|
// echo $update_methode;
|
|
}else{
|
|
$queryupdate ="UPDATE m_methode_priority SET
|
|
M_MethodePriorityNumber = '{$priority}',
|
|
M_MethodePriorityUserID = '{$userid}',
|
|
M_MethodePriorityLastUpdated = now()
|
|
WHERE
|
|
M_MethodePriorityID = ?
|
|
";
|
|
// echo $queryupdate;
|
|
$update_methode = $this->db_onedev->query($queryupdate,array($v['M_MethodePriorityID'],));
|
|
}
|
|
|
|
}
|
|
|
|
$result = array(
|
|
"total" => 1 ,
|
|
"records" => array('status'=>'OK')
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
|
|
function deletepatient(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$prm = $this->sys_input;
|
|
$userid = $this->sys_user["M_UserID"];
|
|
$query ="UPDATE t_receivereferencepatient SET
|
|
M_MethodePriorityIsActive = 'N',
|
|
M_MethodePriorityUserID = '{$userid}'
|
|
WHERE
|
|
M_MethodePriorityID = '{$prm['M_MethodePriorityID']}'
|
|
";
|
|
//echo $query;
|
|
$rows = $this->db_onedev->query($query);
|
|
|
|
$query ="UPDATE m_methode_priority SET
|
|
M_MethodePriorityIsActive = 'N',
|
|
M_MethodePriorityUserID = '{$userid}'
|
|
WHERE
|
|
M_MethodePriorityM_MethodePriorityID = '{$prm['M_MethodePriorityID']}' AND M_MethodePriorityIsActive = 'Y'
|
|
";
|
|
//echo $query;
|
|
$rows = $this->db_onedev->query($query);
|
|
|
|
$result = array(
|
|
"total" => 1 ,
|
|
"records" => array('status'=>'OK')
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
function searchtest(){
|
|
$prm = $this->sys_input;
|
|
|
|
$max_rst = 12;
|
|
$tot_count = 0;
|
|
|
|
$q = [
|
|
'search' => '%'
|
|
];
|
|
|
|
if ($prm['search'] != '')
|
|
{
|
|
$q['search'] = "%{$prm['search']}%";
|
|
}
|
|
|
|
$mou_id = $prm['mouid'];
|
|
// QUERY TOTAL
|
|
$sql = "SELECT count(*) as total
|
|
FROM t_test
|
|
JOIN t_price ON T_PriceT_TestID = T_TestID AND T_PriceIsCito = 'N' AND T_PriceM_MouID = '{$mou_id}'
|
|
WHERE
|
|
T_TestName like ? AND
|
|
T_TestIsActive = 'Y'
|
|
ORDER BY T_TestName ASC";
|
|
$query = $this->db_onedev->query($sql,$q['search']);
|
|
//echo $query;
|
|
if ($query) {
|
|
$tot_count = $query->result_array()[0]["total"];
|
|
}
|
|
else {
|
|
$this->sys_error_db("test count",$this->db_onedev);
|
|
exit;
|
|
}
|
|
|
|
$sql = "
|
|
SELECT 'Y' as editable, 0 as xid, T_TestID, T_TestCode, T_TestName, T_PriceAmount, T_PriceDisc, T_PriceDiscRp, T_PriceAmount - ((T_PriceDisc/100) * T_PriceAmount) - T_PriceDiscRp as total,
|
|
M_CompanyID,'N' as M_CompanyIsBill, 0 as M_CompanyMinDP
|
|
FROM one_lis_dev.t_test
|
|
JOIN one_lis_dev.t_price ON T_PriceT_TestID = T_TestID AND T_PriceIsCito = 'N' AND T_PriceM_MouID = '{$mou_id}'
|
|
JOIN one_lis_dev.m_mou ON M_MouID = '{$mou_id}'
|
|
JOIN one_lis_dev.m_company ON M_MouM_CompanyID = M_CompanyID
|
|
WHERE
|
|
T_TestName like ? AND
|
|
T_TestIsActive = 'Y'
|
|
ORDER BY T_TestName ASC
|
|
";
|
|
$query = $this->db_onedev->query($sql, array($q['search']));
|
|
|
|
if ($query) {
|
|
$rows = $query->result_array();
|
|
//echo $this->db_onedev->last_query();
|
|
$result = array("total" => $tot_count, "records" => $rows, "total_display" => sizeof($rows));
|
|
$this->sys_ok($result);
|
|
}
|
|
else {
|
|
$this->sys_error_db("test rows",$this->db_onedev);
|
|
exit;
|
|
}
|
|
}
|
|
|
|
} |