Files
REG_IBL/one-api/application/controllers/mockup/clinic/fo/Conf.php
2026-05-25 20:01:37 +07:00

37 lines
796 B
PHP

<?php
class Conf extends MY_Controller
{
var $db_smartone;
public function index()
{
echo "CONF API";
}
public function __construct()
{
parent::__construct();
$this->db_smartone = $this->load->database("onedev", true);
}
public function search()
{
$prm = $this->sys_input;
$tot_count = 1;
$sql = "SELECT * FROM conf_clinic";
$query = $this->db_smartone->query($sql);
if ($query) {
$rows = $query->row();
$result = array("total" => $tot_count, "records" => $rows, "total_display" => sizeof($rows));
$this->sys_ok($result);
}
else {
$this->sys_error_db("CONF rows",$this->db_smartone);
exit;
}
}
}