Hack3y - 05 November 2012 01:50 AM
Can you provide some more info, like post the code that is causing the error?
in the model thare has
function cadastrar($data)
{
$this->attributes($data);
$this->db->insert(‘participante’,$data; // $data is a associative array
}
In de controller has
function confirmar()
{
$inscricao = new InscricaoModel();
$participante = new ParticipanteModel();
$data = array(
‘nome’=>$this->input->post(‘nome’),
‘cpf’=>$this->input->post(‘cpf’),
‘email’=>$this->input->post(‘email’),
‘telefone’=>$this->input->post(‘telefone’),
‘instituicao’=>$this->input->post(‘instituicao’),
‘tipoInstituicao’=>$this->input->post(‘tipoInstituicao’)
);
$inscricao->cadastrar($data)
}
class file in the database autoload was initialized
$autoload[‘libraries’] = array(‘database’,‘session’,‘form_validation’);
and in the function __construct, the models classes was initialized, too.
function __construct()
{
parent::__construct();
$this->load->model(‘membroModel’);
$this->load->model(‘inscricaoModel’);
$this->load->model(‘participanteModel’);
}