Flatten mockup repo
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
|
||||
class Helper extends MY_Controller
|
||||
{
|
||||
var $db_smartone;
|
||||
|
||||
public function index()
|
||||
{
|
||||
echo "RE Helper API";
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->db_smartone = $this->load->database("onedev", true);
|
||||
}
|
||||
|
||||
public function calc_age()
|
||||
{
|
||||
$prm = $this->sys_input;
|
||||
$orderID = $prm["orderID"];
|
||||
|
||||
$sql = "call sp_recount_age(?)";
|
||||
$query = $this->db_smartone->query($sql,array($orderID));
|
||||
|
||||
if ($query) {
|
||||
$this->sys_ok("OK");
|
||||
}
|
||||
else {
|
||||
$this->sys_error_db("", $this->db_smartone);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user