public function appProfile($id=null)
{
$query= $this->db->where('software_db.id',$id)
->from('software_db')
->join('dev_db','software_db.dev_id=dev_db.id','right')
->select(['dev_db.name','dev_db.id','software_db.id','software_db.name','software_db.file_name','software_db.image_name'])
->get()
->result_array();
print_r($query);die;
}
The table structure is as follows:
dev_db(id(primary key),name,email,password,comany,skills)
software_db(id(primary key), name,file_name,image_name,description,platform,cateogory)
The output array never contains the id and name from dev_db. It should return all the fields from software_db where software.id=$id and name and id from dev_db.
software_db.id=dev_db.idrather thansoftware_db.dev_id=dev_db.id