codeigniter多表更新查询

时间:2017-12-21 05:28:48

标签: php mysql codeigniter-2

这是我的代码

$RestaurantId=14;
$data['status']=0;

$this->db->set('a.status', $data['status']);
$this->db->set('b.status', $data['status']);
$this->db->where('a.id', $RestaurantId);
$this->db->join('b','a.id = b.business_location_id');
$result =$this->db->update('b_locations_info as a,b_images as b');

错误:

kpbaiger.b_locations_info as a,b_images不存在 在SQL上:

  

更新b_locations_info as a,b_imagesb设置astatus ='0',bstatus ='0'   在aid ='14'

0 个答案:

没有答案