Skip to content

Instantly share code, notes, and snippets.

@donaldallen
Created February 11, 2013 18:25
Show Gist options
  • Save donaldallen/4756420 to your computer and use it in GitHub Desktop.
Save donaldallen/4756420 to your computer and use it in GitHub Desktop.
$bookings = $this->bookings->get_many_by(array('archive' => '!= 0', 'status' => Status::get('accepted')->id));
$count = count($bookings);
$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