[eluser]Capt. Kirk[/eluser]
Hello everyone,
It seems that there is a problem with this new version of C.I. related to the database classes.
I'm getting this error from my application that, with the previous version, I hadn't it.
-->An Error Was Encountered
Error Number:
ERROR: syntax error at or near "," at character 33
SELECT * FROM ("entradas_mestre", "entradas_detalhe") WHERE entradas_mestre.numero_nota_id = '2' AND entradas_mestre.fornecedor = '3' AND entradas_detalhe.numero_nota_id = '2' AND entradas_detalhe.fornecedor = '3' <--
Notice the parenthesis and the quotation marks after the FROM clause of the SQL statement.
Here follows the code that generates this SQL:
-->
$where = array('entradas_mestre.numero_nota_id'=>$data['numero_nota_id'], 'entradas_mestre.fornecedor'=>$data['fornecedor'], 'entradas_detalhe.numero_nota_id'=>$data['numero_nota_id'], 'entradas_detalhe.fornecedor'=>$data['fornecedor']);
$this->db->where($where);
$this->db->from('entradas_mestre');
$this->db->from('entradas_detalhe');
$data['query'] = $this->db->get();
<--
Now, the manual of C.I. says that the functions above should generate the same code without the parenthesis and without the quotation marks, wich causes this syntax error in the Postgres. So, have occured some change in the database class core? Can anyone help with that? It is driving me crazy!! :-)
Thank you all for your support.
Best regards.