|
请问为什么我一用$result->result_array();
就报错Call to a member function result_array() on a non-object
C:
class Adddomains extends Controller {
function Adddomains()
{
parent::Controller();
}
function index()
{
$this->load->model('Get_keywords');
$result = $this->Get_keywords->get_mkeys();
$data['keywords'] = $result->result_array();
$this->load->view('adddomains',$data);
}
}
M:
function get_mkeys()
{
$this->load->database();
$query = $this->db->get('mkey');
return $query->result();
} |
|