Welcome Guest, Not a member yet? Register   Sign In
New to CI
#5

[eluser]mattpointblank[/eluser]
Your model should have a function like this:

Code:
function getRow($id)
{
    return $this->db->get_where('table', array('id' => $id))->result_array();
}

Then in your controller you can access the data like this:

Code:
$this->load->model('Your_model');
$data['rows'] = $this->Your_model->getRow($id);
$this->load->view('your_view', $data);
// you can now access an array called $rows in your view.


Messages In This Thread
New to CI - by El Forum - 11-03-2009, 11:43 PM
New to CI - by El Forum - 11-04-2009, 12:23 AM
New to CI - by El Forum - 11-04-2009, 03:39 AM
New to CI - by El Forum - 11-04-2009, 09:01 AM
New to CI - by El Forum - 11-04-2009, 09:39 AM
New to CI - by El Forum - 11-04-2009, 09:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB