Welcome Guest, Not a member yet? Register   Sign In
Two method calls in one Request

Hey guys,

at first I will say thx for this very nice framework. I will now porting my applications (mostly build with Zend Framework) to this great framework. I like the performance of this. Wink

But to my problem. I have a little CRUD class build and in this class I've a delete methode which will delete a row by the primary id.

The Code from this methode is the following:

public function delete() {
        $id = $this->uri->segment(3);

and a sample myDelete methode from a model:

public function myDelete($id) {
        log_message('debug', 'Users::myDelete('.$id.') aufgerufen.');
        $query = $this->db->get_where($this->_table_name, array('user_id' => $id));
        $user_data = $query->row_array();
        $session_id = (!empty($user_data['user_session_id'])) ? $user_data['user_session_id'] : NULL;
        $this->db->delete('sessions', array('session_id' => $session_id));
        $this->db->delete($this->_table_name, array('user_id' => $id));

And the my delete methode will is calling two mal.

Any ideas why?


PS: Sorry for my bad english. Wink

Theme © iAndrew 2016 - Forum software by © MyBB