Initial import
This commit is contained in:
29
application/controllers/v1/old_report-dev/Agama.php
Normal file
29
application/controllers/v1/old_report-dev/Agama.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
class Agama extends MY_Controller
|
||||
{
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->db_smartone = $this->load->database("onedev", true);
|
||||
}
|
||||
function list() {
|
||||
$sql = "select * from m_religion";
|
||||
$qry = $this->db_smartone->query($sql);
|
||||
if ($qry) {
|
||||
$rows = $qry->result_array();
|
||||
echo json_encode($rows);
|
||||
} else {
|
||||
echo json_encode(array());
|
||||
}
|
||||
}
|
||||
function get($id) {
|
||||
$sql = "select * from m_religion where M_ReligionID=?";
|
||||
$qry = $this->db_smartone->query($sql,$id);
|
||||
if ($qry) {
|
||||
$rows = $qry->result_array();
|
||||
echo json_encode($rows);
|
||||
} else {
|
||||
echo json_encode(array());
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user