[eluser]new_igniter[/eluser]
Hello,
I am very new to CI and having some beginner questions.
What I want to do is qun a query from a model, get an array of 1 row of data(something like title, contents, author,) return that array to my controller, pass the array into my view, where I can then echo the variables out.
My Model
Code:
function getPostContents($postUriID)
{
$query = $this->db->query("my query");
if(empty($query))
return false;
$row = $query->row();
?? what do I return here?
}
My Controller
Code:
$data['postContents'] = $this->Postsmodel->getPostContents($postUriID);
?? is this right?
My View
?? How do I then just do something like <?php echo $row->title; ?>
Thanks so much