[eluser]Bionicjoe[/eluser]
Thanks cahva!
I went home last night and did some reading that cleared up CI immensely.
My key mistake was thinking of MVC data flow as:
Controller -> Model -> View
It's really
Controller <-> Model
then Controller -> View
Your example worked but I just needed to move the vars around to present it properly.
Also those echos in the Model were just to see if the model was working.
One more question.
If my query returns no results how can I make it send a "No results found." message to the view.
What I'm trying now, but the 'else' part does nothing.
Code:
function listoutageupdates($id)
{
$this->db->order_by("updateid", "desc");
$query = $this->db->get_where('updates', array('outageid' => $id));
if ($query->num_rows() > 0)
{
return $query->result();
}
else
{
// Return a no results found message.
return $query = 'No updates found.';
}
}