<?php $banco = new Query_model(); $banco->SetTabelas("anunciantes"); $banco->SetCampos("*"); $banco->SetCondicao(""); $banco->SetTipoRetorno(0); $dados['resultados'] = $banco->get(); if ($this->uri->segment(3) != '' && $this->uri->segment(4) == 'excluir' && $this->uri->segment(5) == '1') { $model = new Categorias_model(); $apagar = $model->deletar_linha($this->uri->segment(3)); $banco->exe_tupla($apagar); redirect($this->uri->segment(1) . '/' . $this->uri->segment(2)); }