can someone check my code if this is how to insert multiple queries in 2 tables with a foreign key of the other? here it is
public function addhw(){
$this->db->trans_start();
$array=array('hw_name'=>$_POST['hw_name'],'hw_description'=>$_POST['hw_description'], 'hw_type'=>$_POST['hw_type'],
'hw_serialno'=>$_POST['hw_serialno'],'hw_manufacturer_id'=>$_POST['manufacturer_id']/*,'hw_picture'=>$_POST['hw_picture']*/);
$this->db->set($array);
$query=$this->db->insert('hardware');