[eluser]Unknown[/eluser]
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.
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:
Code:
public function delete() {
$id = $this->uri->segment(3);
$this->{$this->model_property_name}->myDelete($id);
redirect($this->controller.'/show');
}
and a sample myDelete methode from a model:
Code:
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->trans_start();
$this->db->delete('sessions', array('session_id' => $session_id));
$this->db->delete($this->_table_name, array('user_id' => $id));
$this->db->trans_complete();
}
And the my delete methode will is calling two mal.
Any ideas why?
Thx
PS: Sorry for my bad english.