Welcome Guest, Not a member yet? Register   Sign In
CI 1.7 - Error on querys (quotes escaping problems)
#41

[eluser]Kumar Chetan sharma[/eluser]
The issue is still there with CI 1.7.2. I am supposed to upgrade a portal to CI1.7.2 and it seems that problem is still there. I removed the backtick in active record class and I hate myself for tinkering with 3rd party libs/code in my project. It is like adding bugs. I will file a bug.
#42

[eluser]Krynble[/eluser]
Just another heads up, I updated to version 1.7.2 and the problem I had remains.

Sample code:

Code:
$this->db->select("p.id_premio, p.ano, pr.nome as premiacao, IFNULL(c.nome , 'Tesis') as cliente, p.projeto, a.nome as agencia, t.arquivo, p.colocacao")

Generated Query:

Code:
SELECT `p`.`id_premio`, `p`.`ano`, `pr`.`nome` as premiacao, IFNULL(c.nome, `'Tesis')` as cliente, `p`.`projeto`, `a`.`nome` as agencia, `t`.`arquivo`, `p`.`colocacao`

The IFNULL function parameter was escaped, while it shouldn't.

I haven't checked for a solution, just trying to complement the information related to the problem. Again, using false as the second parameter for the select caused the select statement to be left unscaped and solved the problem, but I don't really like this idea either.

Thanks in advance,
Omar Ajoue.




Theme © iAndrew 2016 - Forum software by © MyBB