Files
BE_IBL/application/controllers/v1/preorder/home-service/Status.php
2026-04-15 15:23:57 +07:00

33 lines
678 B
PHP
Executable File

<?php
class Status extends MY_Controller
{
var $db_onedev;
public function index()
{
echo "API";
}
public function __construct()
{
parent::__construct();
$this->db_onedev = $this->load->database("onedev", true);
}
public function lookup()
{
$query = " SELECT M_PreOrderStatusID as id, M_PreOrderStatusName as name, M_PreOrderStatusColor as color
FROM one_preorder_dev.m_preorderstatus
WHERE
M_PreOrderStatusIsActive = 'Y'";
$rows = $this->db_onedev->query($query)->result_array();
$result = array(
"total" => count($rows) ,
"records" => $rows,
);
$this->sys_ok($result);
exit;
}
}