class M_db_sync extends CI_Model {
function __construct(){
parent::__construct();
$db_local = $this->load->database('default', TRUE);
$db_remote = $this->load->database('remote', TRUE);
}
function get_local_data(){
// $db_local = $this->load->database('default', TRUE);
$db_local->order_by("id", "desc");
$db_local->limit(5);
$query = $db_local->get('test');
return $query;
}
function get_remote_data(){
//$db_remote = $this->load->database('remote', TRUE);
$db_remote->limit(10);
$query = $db_remote->get('Current_Full');
return $query;
}
}