当前位置: 首页>>代码示例>>PHP>>正文


PHP Branch::get方法代码示例

本文整理汇总了PHP中Branch::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Branch::get方法的具体用法?PHP Branch::get怎么用?PHP Branch::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Branch的用法示例。


在下文中一共展示了Branch::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Branch

 function list_drop()
 {
     $branch = new Branch();
     $branch->get();
     foreach ($branch as $row) {
         $data[''] = '[ Pilih Cabang ]';
         $data[$row->branch_name] = $row->branch_name;
     }
     return $data;
 }
开发者ID:anggadjava,项目名称:payroll,代码行数:10,代码来源:branch.php

示例2: index

 public function index($offset = 0)
 {
     $this->filter_access('Branch', 'roled_select', base_url());
     $branch_list = new Branch();
     switch ($this->input->get('c')) {
         case "1":
             $data['col'] = "branch_name";
             break;
         case "2":
             $data['col'] = "branch_id";
             break;
         default:
             $data['col'] = "branch_id";
     }
     if ($this->input->get('d') == "1") {
         $data['dir'] = "DESC";
     } else {
         $data['dir'] = "ASC";
     }
     $data['title'] = "Branch";
     $data['btn_add'] = anchor('branches/add', 'Add New', "class='btn btn-primary'");
     $data['btn_home'] = anchor(base_url(), 'Home', "class='btn btn-home'");
     $uri_segment = 3;
     $offset = $this->uri->segment($uri_segment);
     if ($this->input->get('search_by')) {
         $total_rows = $branch_list->like($_GET['search_by'], $_GET['q'])->count();
         $branch_list->like($_GET['search_by'], $_GET['q'])->order_by($data['col'], $data['dir']);
     } else {
         $total_rows = $branch_list->count();
         $branch_list->order_by($data['col'], $data['dir']);
     }
     $data['branch_list'] = $branch_list->get($this->limit, $offset)->all;
     $config['base_url'] = site_url("branches/index");
     $config['total_rows'] = $total_rows;
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = $uri_segment;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $this->load->view('branches/index', $data);
 }
开发者ID:anggadjava,项目名称:payroll,代码行数:40,代码来源:branches.php

示例3: print_r

print_r(Branch::getCurrency('1'));
echo '</pre>';
?>
<p style="font-weight: bold;">Update</p><p><?php 
$data = array();
$data['id'] = '2';
$data['address'] = "Suite 3, 22 Council St,\nHawthorn East";
$data['state'] = "Victoria";
$data['zip'] = "3123";
$data['country'] = 'AU';
$data['phone'] = '+61 03 9882 7164';
$data['fax'] = '+61 03 9882 9792';
?>
Before...<?php 
echo '<pre>';
print_r(Branch::get('2'));
echo '</pre>';
Branch::update($data);
?>
After...<?php 
echo '<pre>';
print_r(Branch::get('2'));
echo '</pre>';
?>
<p style="font-weight: bold;">Find</p><p><?php 
$criteria = array('columns' => 'branches.branch, branches.address, branches.zip, branches.state, countries.country', 'match' => 'branches.phone LIKE \'%6363\'', 'joins' => 'countries ON countries.country_code = branches.country');
echo '<pre>';
print_r(Branch::find($criteria));
echo '</pre>';
?>
</p>
开发者ID:pamalite,项目名称:yel,代码行数:31,代码来源:branch.php

示例4: listBranch

 public static function listBranch()
 {
     $list = \Branch::get(array('user_id', 'branch_name'));
     return $list;
 }
开发者ID:bhoopal10,项目名称:PayrollOriginal,代码行数:5,代码来源:libEmp.php


注:本文中的Branch::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。