我在我的$templike(7,8,9) 中有多个 id,我想在我的 where 条件中比较那里的 id,$this->db->where_in('c.mr_no',$temp);但它只比较第一个 id
我正在尝试这样:
控制器:
public function printCollectionRecPage()
{
$this->load->view('template/header');
$this->load->view('template/sidebar');
$temp =($_GET['id']);
$data = array();
$data['collnR'] = $this->PayRecAllModel->printCollectionRecPage($temp);
$this->load->view('crossing/payment_rec_allocation/printCollectionRecovery',$data);
$this->load->view('template/footer');
}
模型:
public function printCollectionRecPage($temp)
{
$this->db->select('c.*,payment_rec_allocn.*');
$this->db->from('crossing_cash_memo c');
$this->db->join('payment_rec_allocn', 'payment_rec_allocn.mr_no = c.mr_no');
$this->db->where('c.total !=','0');
$this->db->where('c.mr_no',$temp);
$query = $this->db->get();
return $query->result();
}
我想在 where 条件下比较所有 3 个 ID。
冉冉说