Welcome Guest, Not a member yet? Register   Sign In
Pagination different between localhost and webs
#1

[eluser]RaiNnTeaRs[/eluser]
Hi all, I;m having difficulties in creating pagination.I'm using the same command in my localhost and my websites( just changing the baseurl's) and its not working. Here is my code :
Code:
$config['base_url']='http://www.rnbtaekwon.com/index.php/dojang/news/';
            
            $config['total_rows']=$this->db->count_all('tabel_news');
            $config['per_page']='5';

            $this->pagination->initialize($config);
            $this->load->model('mpagination');
            $data['hasil'] = $this->mpagination->get_data('tabel_news',$config['per_page'],$this->uri->segment(3));

            $tmpl = array ( 'table_open'  => '<table border="2" cellpadding="2" cellspacing="2" class="mytable">' );
            $this->table->set_template($tmpl);

my models filename is mpagination.php
Code:
&lt;?
class mpagination extends Model
{
    function mpagination()    {
        parent::Model();
    }
    function get_data($tab,$num,$offset)    {
    
        $this->db->select('news,tanggal,sender');
        $this->db->from($tab);
        $this->db->orderby("tanggal","asc");
                
        $query = $this->db->get($tab, $num, $offset);
        return $query;
    }
}
?&gt;
Help me plz. need help fast T-T
#2

[eluser]RaiNnTeaRs[/eluser]
BTW, im using PHP 4 as my compiler .thx
#3

[eluser]ontguy[/eluser]
what does the output of
Code:
echo $this->pagination->create_links();
look like in the view?




Theme © iAndrew 2016 - Forum software by © MyBB