[eluser]Xtrex[/eluser]
Hi, Iam using a model to preform a query:
Code:
function noticias_url($uri,$tipo) {
$query = $this->db->query('SELECT * FROM noticias WHERE uri = "'. $uri .'" AND tipo = "'. $tipo .'"' );
return $query->result();
}
How can I use the information passed by this controller in the "noticias" view? And how can I use $query->num_rows()?
Code:
$this->load->model('noticiar', '', TRUE);
$data['noticias'] = $this->noticiar->noticias_url($uri,1);
$this->load->view('noticias', $data);