[eluser]jord[/eluser]
I've been playing a with ci for a new project and I'm really liking it so far, but I'm having a problem any time I try to connect to a database.
controller: books.php
Code:
<?php
class Books extends Controller
{
function Books()
{
parent::Controller();
}
function index()
{
$this->load->model('booksmodel');
$qry = $this->booksmodel->get_entries();
echo $qry->title;
}
?>
model: booksmodel.php
Code:
<?php
class Booksmodel extends Model
{
function Booksmodel()
{
parent::Model();
}
function get_entries()
{
$query = $this->db->get('BK_books');
return $query->result();
}
}
?>
When I load the books controller in a browser, I get a blank page, with no source.
If I comment out the foreach loop in the controller, then my unordered list tags show up in the source.
Can anyone tell me what I'm doing wrong?
-- Edited
Updated the code samples to my current code.