public function inserir($arquivo) { $this->base->load_helper('csv'); $csv = new Csv(); $dados = $csv->ler($arquivo); //insere os dados do csv $i = 0; //LIMPA A TABELA $this->clear_table('vendas'); while ($i <= count($dados)) { $rs[] = $this->insert($dados[$i], 'vendas'); $i++; } $this->base->set_msg('sucess', "Arquivo importando com sucesso!"); $this->base->redir('lista'); //return $dados; }