title: In Codeigniter Pagination's generated page links, page 1 is always selected
body: <p>I'm about to pull my hair over this!</p>
  
  <p>On initial load of my page with pagination (by CI), all rows are displayed, even if I only want 3. On click of other pages, however, it works fine (the correct rows are displayed), but Page 1 is always "selected" (not clickable), even if I click on Page 2, 3, etc.</p>
  
  <p>Any ideas?</p>
  
  <p>My <strong>CONTROLLER</strong>:</p>
  
  <pre><code>function album($type, $album_id, $album_name) {
  
      $this-&gt;load-&gt;library('pagination');
      $config['base_url'] = base_url("photo_store/album/$type/$album_id/$album_name/");
      $config['total_rows'] = $this-&gt;Media_model-&gt;get_photos($album_id, 'display_date DESC', NULL, NULL, TRUE);
      $config['per_page'] = 3;
      $this-&gt;pagination-&gt;initialize($config);
      $album_photos = $this-&gt;Media_model-&gt;get_photos($album_id, 'display_date DESC', $config['per_page'], $this-&gt;uri-&gt;segment(6), FALSE);
  
      $this-&gt;_load_view(array(
          /* some other variables here */
          'album_photos' =&gt; $album_photos
      ));
  
  )
  
  private function _load_view($more_data) {
      $data = array_merge($more_data, array( /* some other variables here */ ));
      $this-&gt;load-&gt;view('template', $data);
  }
  </code></pre>
  
  <p>My <strong>MODEL</strong>:</p>
  
  <pre><code>public function get_photos($album_id=NULL, $order_by='display_date DESC', $limit=NULL, $offset=NULL, $count=FALSE) {
  
      $result = array();
      $query = $this-&gt;db-&gt;select('medium.*')-&gt;join('medium', "$this-&gt;item.medium_id = medium.id", 'inner')-&gt;order_by($order_by);
      $limit = $limit ? $limit : '0';
      $offset = $offset ? $offset : '0';
      if ($limit!=='0' &amp;&amp; $offset!=='0') {
          $query-&gt;limit($limit, $offset);
      }
  
      if ($album_id) { $result = $query-&gt;get_where($this-&gt;item, array('album_id' =&gt; $album_id)); }
      else { $result = $query-&gt;get($this-&gt;item); }
  
      if ($count){ return $result-&gt;num_rows(); }
      else { return $result-&gt;result(); }
  
  }
  </code></pre>
  
  <p>My <strong>VIEW</strong>:</p>
  
  <pre><code>foreach ($album_photos as $photo) {
      //display photos here
  }
  echo $this-&gt;pagination-&gt;create_links();
  </code></pre>