|
楼主 |
发表于 2011-8-31 17:47:48
|
显示全部楼层
view层的连接
<a href="<?php echo site_url("house/house/update_estate_page/".$rows['EID'])?>">更新
Control层
function update_estate($estate_id)
{
$this->load->model('admin_user_model');
$role_id = $this->session->userdata('RoleKey');
$data['role_right'] = $this->admin_user_model->get_role_right($role_id);
$this->load->model('house/estate_model');
$this->estate_model->update_estate($estate_id);
$data['estate'] = $this->estate_model->query_estate();
$this->load->view('house/query_estate_view',$data);
}
model层
function update_estate($estate_id)
{
$BelongRegion = $this->input->post('Province');
$BelongRegion .= ','.$this->input->post('City');
$BelongRegion .= ','.$this->input->post('District');
$data = array(
'EstateName' => $this->input->post('EstateName'),
'EstateAbbr' => $this->input->post('EstateAbbr'),
'BelongRegion' => $BelongRegion,
'BelongSector' => $this->input->post('BelongSector'),
'DetailAddress' => $this->input->post('DetailAddress'),
'Channel' => $this->input->post('Channel'),
'Memo' => $this->input->post('Memo')
);
$this->db->where('EID', $estate_id);
$this->db->update('estateinfo', $data);
$data = array(
'Phone' => $this->input->post('Phone'),
'PropertyType' => $this->input->post('PropertyType'),
'ProPayDate' => $this->input->post('ProPayDate')
);
$this->db->where('EID', $estate_id);
$this->db->update('buildinfo', $data);
$log['OperatorID']= $this->session->userdata['userID'];
$log['OperatorContent'] = "更新楼盘" ;
$log['LogTime'] =date('y-m-d H:i:s',time());
$log['ConstraintName'] = "add_estateUpdate_view.php";
$this->db->insert('sys_log',$log);
}
红色部分的插入语句就是出现问题的地方 |
|