Codeigniter select option view records from mysql
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