Welcome Guest, Not a member yet? Register   Sign In
C.I. 1.6 little problem....

[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']);

$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.

Take a look here bug #3387, the first comment has the fix.

[eluser]Capt. Kirk[/eluser]
Thank you very much for your assistance! :-)

Best regards!

Theme © iAndrew 2016 - Forum software by © MyBB