remyremy remyremy - 4 months ago 15x
MySQL Question

num_rows on delete query codeigniter

I'm trying to find a way to validate that my Delete query was successful. How can I get num_rows or affected_rows from the following structure:

public function fire_db($currentUserID, $id_staff){
$this->db->where('id_player', $currentUserID);
$this->db->where('id_hired_staff', $id_staff);
if ($this->db->num_rows() == 1) {
return true;
return false;

Using codeigniter 3


to test result of delete query use