飞雪残剑 发表于 2010-2-9 22:58:55

分也不能显示

本帖最后由 飞雪残剑 于 2010-2-9 23:04 编辑

我仿照“一哈子”的视频做分页可总有个错,急死我了都
错误提示:
这是我控制器里的代码
      $this->load->view('comment_view',$data);
      $config['base_url']=base_url().'index.php/blog/comments/'.$this->uri->segment(3);
      $config['total_rows']=$this->Mblog->select_num_rows($this->uri->segment(3));
      $config['per_page']=5;
      $config['uri_segment']=4;
      $config['full_tag_open']='<p>';
      $config['full_tag_close']='</p>';
      $config['first_link']='第一页';
      $config['last_link']='尾页';
      $config['next_link']='下一页';
      $config['prev_link']='上一页';
      $this->pagination->initialize($config);
      $data['comments_list']=$this->Mblog->get_page($this->uri->segment(3),$this->uri->segment(4,0),$config['per_page']);
      $this->load->view('comment_view',$data);
这是我模型里的代码
function select_num_rows($category)
    {
      $query = $this->db->query("SELECT * FROM comments WHERE entry_id = $category");
      return $query->num_rows();
      
    }
其中控制器里第三行就是错误提示的“line 45”

jeongee 发表于 2010-2-9 23:03:17

$config['total_rows']=$this->Mblog->select_num_rows($this->uri->segment(3));
没发现你模型里有select_num_rows这个函数啊

飞雪残剑 发表于 2010-2-9 23:06:26

哦哦,刚刚贴错了,现在改过来了,抱歉

jeongee 发表于 2010-2-10 00:01:25

回复 3# 飞雪残剑


    你有没有加载MODEL啊

飞雪残剑 发表于 2010-2-10 11:34:06

哦,确实没有加载,我太粗心了,已经解决了,谢谢ywqbestever!请管理员结帖

berthav 发表于 2010-3-4 15:08:55

视频有没有高清的啊?

Hex 发表于 2010-3-4 15:12:59

中文视频有下载地址,其他视频无高清,因为国内没有高清视频平台。
页: [1]
查看完整版本: 分也不能显示