[eluser]Fero[/eluser]
Hi,
This is my model function:
Code:
function nacitaj_produkt($id)
{
$query=$this->db->get_where('produkty',array('status'=>'1','id_produkty'=>$id));
return $query->result();
}
It loads one row of one product and returns it.
This is in one method of my controller:
Code:
$this->load->model('produkty_model');
$product_data['product']=$this->produkty_model->nacitaj_produkt($id);
$this->load->view('detail',$product_data);
in detail.php (view) I have no idea how to get those variables from database I got. echo $product->table_column; works only in loops in views, but it doens't work when there is only one row.