<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Welcome_model extends CI_Model {
public function select(){
$this->db->get('av_home');
echo $this->db->num_rows();
}
}
Run Code Online (Sandbox Code Playgroud)
上面的代码给出错误,
调用未定义的方法CI_DB_mysql_driver :: num_rows()