22 lines
490 B
PHP
22 lines
490 B
PHP
<?php if (!defined('BASEPATH')) {
|
|
exit('No direct script access allowed');
|
|
}
|
|
|
|
class Country_model extends CI_Model
|
|
{
|
|
private $read_replica;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->read_replica = $this->load->database('savvy_replica', TRUE);
|
|
}
|
|
|
|
public function getAll()
|
|
{
|
|
$this->read_replica->order_by('country', 'ASC');
|
|
$query = $this->read_replica->get('country');
|
|
return $query->result();
|
|
}
|
|
}
|