Welcome Guest, Not a member yet? Register   Sign In
Getting value of ID from view to controller to model
#2

[eluser]mattpointblank[/eluser]
Controller:

Code:
function gather($id)
{
    $this->load->model('your_model');
    $person = $this->your_model->getPerson($id)
}

Model:

Code:
function getPerson($id)
{
    return $this->db->get_where('persons', array('id' => $id))->row_array();
}

Or similar.


Messages In This Thread
Getting value of ID from view to controller to model - by El Forum - 05-21-2010, 08:56 AM
Getting value of ID from view to controller to model - by El Forum - 05-21-2010, 09:29 AM
Getting value of ID from view to controller to model - by El Forum - 05-21-2010, 10:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB