Codeigniter select option view records from mysql
00:11 16 Sep 2022

I've got some troubles with loading db data to an select option form. Records are not showing and I don't know where is a problem.. I need to view 'name' from 'location_cities' table in db.

Controller:

public function edit_product($id)
    {
$data['product_location'] = $this->product_model->get_product_location();
$this->load->view('dashboard/includes/_header', $data);
        $this->load->view('dashboard/product/edit_product', $data);
        $this->load->view('dashboard/includes/_footer');
    }

Model:

function get_product_location()
    {
      $this->db->join('location_cities');
      $this->db->select('location_cities.*');
      $query = $this->db->get('location_cities');
      return $query->result(); 
    }

View:

  

I would much appreciate your tips how to fix this. Kind regards, Krzysztof

php mysql codeigniter model-view-controller resultset