Skip to content

Instantly share code, notes, and snippets.

@jblac
Forked from donaldallen/gist:4756420
Last active December 12, 2015 10:08
Show Gist options
  • Save jblac/4756430 to your computer and use it in GitHub Desktop.
Save jblac/4756430 to your computer and use it in GitHub Desktop.
$count = $this->bookings->where('archive != 0')->where('status', Status::get('accepted')->id)->count_all()
$config['base_url'] = site_url('admin/creatives/manage');
$config['uri_segment'] = 4;
$config['total_rows'] = $count;
$config['per_page'] = '20';
$config['num_links'] = '10';
$this->pagination->initialize($config);
$this->template->set('bookings',
$this->bookings
->limit($config['per_page'], $this->uri->segment(4))
->get_many_by(array('archive' => '!= 0', 'status' => Status::get('accepted')->id)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment