• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination problem!

#14
[eluser]WebbHelp[/eluser]
I tried your:

Code:
function imagegallery()
    {
        
        $id = $this->db->query("SELECT id FROM pages WHERE menu = '". $this->uri->segment(3) ."'");
        $id = $id->row();
        $pageinfo = $this->db->query("SELECT * FROM imagegallery WHERE page = ". intval($id->id));
            $pageinfo = $pageinfo->row();
        
        $images = $this->db->query("SELECT * FROM images WHERE page = ". intval($id->id) ." ORDER BY id DESC LIMIT 2,". $this->uri->segment(4) ."");
        
        $this->load->library('pagination');

        $config['base_url'] = site_url('page/imagegallery/'. $this->uri->segment(3));
        echo $config['base_url'];
        $config['total_rows'] = $images->num_rows();
        $config['per_page'] = '2';
        $config['full_tag_open'] = '<p>';
        $config['full_tag_close'] = '</p>';
        $config['uri_segment'] = '4';
        
        echo '<br />'. $images->num_rows() .'<br />';

        $this->pagination->initialize($config);
        
        
        
        $header['generalinfo']    =   $this->general; //Data from general table
        $header['title']          =   $pageinfo->title; //Page title
        $header['menuquery']      =   $this->menu; //The menu
        $header['standardpage']   =   $this->standard_menu; //The standardpage
        $content['head']          =   $pageinfo->head;
        $content['images']        =   $this->db->query("SELECT * FROM images WHERE page = ". intval($id->id) ." ORDER BY id DESC LIMIT ". $config['per_page'] ." , ". $this->uri->segment(4));
        $footer['copyright']      =   $this->general->copyright; //General setting: copyright
        
        $this->load->view('header', $header);
        $this->load->view('imagegallery', $content);
        $this->load->view('footer', $footer);
    }

Now I got:
$images = $this->db->query("SELECT * FROM images WHERE page = ". intval($id->id) ." ORDER BY id DESC LIMIT 2,". $this->uri->segment(4) ."");

But it doesn't work!


Messages In This Thread
Pagination problem! - by El Forum - 12-13-2009, 02:29 PM
Pagination problem! - by El Forum - 12-13-2009, 03:24 PM
Pagination problem! - by El Forum - 12-13-2009, 05:31 PM
Pagination problem! - by El Forum - 12-14-2009, 10:12 AM
Pagination problem! - by El Forum - 12-14-2009, 01:00 PM
Pagination problem! - by El Forum - 12-14-2009, 02:54 PM
Pagination problem! - by El Forum - 12-14-2009, 04:02 PM
Pagination problem! - by El Forum - 12-14-2009, 04:07 PM
Pagination problem! - by El Forum - 12-14-2009, 04:11 PM
Pagination problem! - by El Forum - 12-14-2009, 04:12 PM
Pagination problem! - by El Forum - 12-14-2009, 04:15 PM
Pagination problem! - by El Forum - 12-14-2009, 04:23 PM
Pagination problem! - by El Forum - 12-14-2009, 04:31 PM
Pagination problem! - by El Forum - 12-14-2009, 04:50 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.