I am trying to make a INSERT
using CodeIgniter and would like to know if there is a more practical form than the one used below:
MODEL
public function set_cliente() {
$dados = array(
'codigo_cliente' => $this->input->post('cCodigocliente'),
'data_cadastro' => $this->input->post('cDatacadastro'),
'hora_cadastro' => $this->input->post('cHoracadastro'),
'funcionario' => $this->input->post('cFuncionario'),
'empresa' => $this->input->post('cEmpresa'),
'representante' => $this->input->post('cRepresentante'),
'modalidade' => $this->input->post('cModalidade')
);
$this->db->insert('tb_clientes', $dados);
}
Would you have some way to do it without typing all the fields?