<?php
class it extends CI_Controller{
public function __Construct()
{
parent::__Construct();
$this->load->model('it_model','it');
}
public function show_stock()
{
$data['product'] = $this->it->show_stock();
$this->load->view('it/stock/show_stock',$data);
}
}
?>
model Code (PHP)
<?php
class it_model extends CI_Model
{
public function show_stock()
{
return $this->db->get('stock_it_product')->result();
}
}
?>