Welcome Guest, Not a member yet? Register   Sign In
Having some session issues, and could use a quick hand
#6

[eluser]pistolPete[/eluser]
Maybe my last post was a bit doubtful.

Quote:Why do you query the database at all?

I meant:

In the model's function update() you update a database entry.
After that you retrieve the same data again! This second database query is superfluous.

The model function would then look like:
Code:
function update(){
        $form = array(
            'id' => $this->input->post('id'),
           (...)
            'profile' => $this->input->post('profile')
         );
        $this->db->where('id', $form['id']);
        $this->db->update('users', $form);

        return $form;  
    }


Messages In This Thread
Having some session issues, and could use a quick hand - by El Forum - 03-15-2009, 01:25 PM
Having some session issues, and could use a quick hand - by El Forum - 03-15-2009, 01:39 PM
Having some session issues, and could use a quick hand - by El Forum - 03-15-2009, 01:50 PM
Having some session issues, and could use a quick hand - by El Forum - 03-15-2009, 01:51 PM
Having some session issues, and could use a quick hand - by El Forum - 03-15-2009, 02:43 PM
Having some session issues, and could use a quick hand - by El Forum - 03-15-2009, 02:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB