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


PHP Family::where方法代码示例

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


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

示例1: update

 function update()
 {
     $family = new Family();
     $fam_id = $this->input->post('id');
     $staff_id = $this->uri->segment(2);
     $family->where('staff_fam_id', $fam_id)->update(array('staff_fam_order' => $this->input->post('staff_fam_order'), 'staff_fam_name' => $this->input->post('staff_fam_name'), 'staff_fam_birthdate' => $this->input->post('staff_fam_birthdate'), 'staff_fam_birthplace' => $this->input->post('staff_fam_birthplace'), 'staff_fam_sex' => $this->input->post('staff_fam_sex'), 'staff_fam_relation' => $this->input->post('staff_fam_relation')));
     $this->session->set_flashdata('message', 'Family Update successfuly.');
     redirect('staffs/' . $staff_id . '/families/index');
 }
开发者ID:anggadjava,项目名称:payroll,代码行数:9,代码来源:families.php

示例2: show

 public function show($id)
 {
     $this->breadcrumb->append_crumb('Home', base_url());
     $this->breadcrumb->append_crumb('Staff Detail', base_url() . '');
     $staff = new Staff();
     $data['staff'] = $staff->where('staff_id', $id)->get();
     $family = new Family();
     $data['families'] = $family->where('staff_fam_staff_id', $data['staff']->staff_id)->get();
     $work = new Work();
     $data['works'] = $work->where('staff_id', $data['staff']->staff_id)->get();
     $education = new Education();
     $data['educations'] = $education->where('staff_id', $data['staff']->staff_id)->get();
     $medical = new Medical();
     $data['medicals'] = $medical->where('staff_id', $data['staff']->staff_id)->get();
     $asset_detail = new Asset_Detail();
     $data['asset_details'] = $asset_detail->where('staff_id', $data['staff']->staff_id)->get();
     $data['btn_back'] = anchor('staffs/', 'Back');
     $data['btn_edit'] = anchor('staffs/edit/' . $data['staff']->staff_id, 'Edit');
     $this->load->view('staffs/show', $data);
 }
开发者ID:anggadjava,项目名称:payroll,代码行数:20,代码来源:staffs.php


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