[eluser]Unknown[/eluser]
i ok now i know that the db conf file is ok, and now i can't do a simple query
i have my table articulos and this code
class Blog extends Controller{
function Blog(){
parent::Controller();
$this->load->helper('text');
$this->load->database();
}
function index()
{
$data['title'] = 'Maternonet - Blog';
$data['articulos'] = $this->db->get('articulos');
$this->load->view('head_view',$data);
$this->load->view('menu_view');
$this->load->view('blog_view',$data);
$this->load->view('footer_view');
}
}
--------------------------------------
and view
<?php foreach($articulos->result() as $articulo):?> (line 1)
<BR>
<h2><?=$articulo->titulo?></h2>
<h5>Por: <?=$articulo->autor?></h5>
<h6><?=$articulo->fecha?></h6>
<p><?=word_limiter($articulo->cuerpo,100)?></p>
<br />
<?=anchor('blog/ver/'.$articulo->id,'Leer mas...')?>
<br />
<br />
<hr/>
<?php endforeach;?>
and i recibe this error
Fatal error: Call to a member function result() on a non-object in line 1
y dump the var $articulos and i see this
bool(false)