I have this code:
public function editar_actividad($actividad)
{
$sql = "call sp_editaractividad('" . $actividad['idactividad'] . "',
'" . $actividad['nomactividad'] . "',
'" . $actividad['descripcion'] . "',
'" . $actividad['estado'] . "',
'" . $actividad['avance'] . "');";
$this->db->query($sql);
if ($this->db->affected_rows() > 0) {
return true;
} else {
return false;
}
}
but it always returns 0 when I use affected_rows