Could you check why the row cannot be deleted. I get database error: Deletes are not allowed unless they contain a "where" or "like" clause. Your help is highly appreciated
Here is my view:
<td><a href="<?php echo base_url("admin/delete_row/".$user['user_id']
); ?>">Delete</a></td>
Here is my controller:
public function delete_row() {
if ($this->session->userdata('is_admin_logged_in')){
$this->load->model("model_admin");
$this->model_admin->did_delete_row();
}
else
{
redirect('admin/login');
}
}
Here is my Model:
public function did_delete_row(){
$this->db->where('user_id', $this->input->get('user_id'));
$this->db->delete('users');
if ($this->db->delete('users'))
{return true;}
else
{return false;}
}