Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to undefined method CI_Loader::result()
#1

[eluser]face1m[/eluser]
I am following the second video tutorial on creating a blog. All of the code has worked up to this point. But i can not find the cause of this error. See code below. thanks in advance for your help. I'm using php 5
rick


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;&lt;?=$title?&gt;&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
<h1>&lt;?=$heading?&gt;</h1>

&lt;?php foreach ( $this->result() as $row ): ?&gt;

<h3>&lt;?=$row->title?&gt;</h3>
<p>&lt;?=$row->body?&gt;</p>
<hr />

&lt;?php endforeach; ?&gt;
------------------------------------------------------------------------

&lt;?php

class Blog extends Controller {

function __construct()
{
parent::Controller();
}



function index()
{

$data['title'] = 'My Blog Title';
$data['heading'] = 'My Blog Heading one';
$data['query'] = $this->db->get('enteries');


$this->load->view('blog_viewer', $data);
}

}
?&gt;

&lt;/body&gt;
&lt;/html&gt;


Messages In This Thread
Fatal error: Call to undefined method CI_Loader::result() - by El Forum - 01-09-2010, 08:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB