0
I have the code
<?php
$chave = $retorno->resposta->cobrancasGeradas->cliente->cobranca->chave;
$this->db->insert('boletos', array('id_fatura'=>$id_fatura, 'chave_boleto'=>$chave));
?>
When he runs this insert
gives me the error:
Error Number: 1054
Unknown column 'HILO3' in 'field list'
INSERT INTO `boletos` (`id_fatura`, `chave_boleto`) VALUES (20, 81954-30765231-HILO3)
Filename: /var/www/html/Cotas/models/conta_model.php
Line Number: 168
The field type of chave_boleto
in Mysql is varchar(100)
That value
81954-30765231-HILO3
is going without the quotes and so it’s not a varchar, I don’t quite understand how it works ('chave_boleto'=>$chave
), but have it return the quotes. Let’s wait for someone explaining how it is.– Ricardo