I have three tables, and I'm going to show the third table. What I want to know is how to delete each entry from it? As, the first and the second tables ids are fetched and inserted in the third one. As in, I have my model as follows.
public function delhr($Interior_house_id, $Interior_room_id)
{
//echo '<pre>'; print_r($Interior_house_id);
$abc= implode(',', array('Interior_house_id'));
print_r($abc);
print_r($Interior_room_id); exit;
$this->db->where(Interior_house_id,$Interior_house_id);
$this->db->where(Interior_room_id,$Interior_room_id);
$data = $this->db->delete('house_room');
return $data;
}
The following is in my controller file.
public function delhr($Interior_house_id,$Interior_room_id)
{
//print_r($interior_house_room_id);
$delete = $this->admin_model->delhr($Interior_house_id, $Interior_room_id);
//echo '<pre>'; print_r($delete);
if($delete) redirect('gethr');
}
Please help me as to how to delete them. As in I have to use both ids to delete. a single record.