You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
538 B
PHP
21 lines
538 B
PHP
<?php
|
|
|
|
class Api_model extends CI_Model {
|
|
|
|
function __construct() {
|
|
parent::__construct();
|
|
$this->JH=$this->load->database('JH', TRUE);
|
|
}
|
|
|
|
function getAll($table,$where="1=1",$order="id desc") {
|
|
$query = $this->JH->order_by("id desc")->get($table);
|
|
return $query->result_array();
|
|
}
|
|
|
|
function _insert($table,$data){
|
|
return $this->JH->insert($table, $data);
|
|
}
|
|
function _update($table,$data,$where){
|
|
return $this->JH->where($where)->update($table, $data);
|
|
}
|
|
} |