本文整理匯總了PHP中Division::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Division::get方法的具體用法?PHP Division::get怎麽用?PHP Division::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Division
的用法示例。
在下文中一共展示了Division::get方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: divisions
function divisions($office_id = '')
{
$o = new Office_m();
$o->get_by_office_id($office_id);
$data['page_name'] = '<b>Divisions of "' . $o->office_name . '"</b>';
$data['msg'] = '';
$this->load->library('pagination');
$divisions = new Division();
$config['base_url'] = base_url() . 'training_manage/course';
$config['total_rows'] = $divisions->count();
$config['per_page'] = '15';
$config['full_tag_open'] = '<p>';
$config['full_tag_close'] = '</p>';
$this->pagination->initialize($config);
// How many related records we want to limit ourselves to
$limit = $config['per_page'];
// Set the offset for our paging
$offset = $this->uri->segment(4);
$divisions->where('office_id', $office_id);
$divisions->order_by('name');
$data['rows'] = $divisions->get($limit, $offset);
$data['office_id'] = $office_id;
$data['page'] = $this->uri->segment(3);
$data['main_content'] = 'divisions';
return View::make('includes/template', $data);
}