Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord Coalesce bug
#1

[eluser]PaulBY[/eluser]
Hello.
I've found one interesting bug:
this code works:
Code:
$this->db->select('COALESCE( categories.id)');
        $this->db->from('categories');
        
        $q=$this->db->get();
but not this:
Code:
$this->db->select('COALESCE( categories.id, 1)');
        $this->db->from('categories');
        $q=$this->db->get();

Could anybody tell me why ? This way I can't use COALESCE function for my purposes, because more than one argument should be passed into it. :grrr:
CodeIgniter 2.1.0
#2

[eluser]CroNiX[/eluser]
Look into the 2nd parameter available in the db:Confusedelect() method.
#3

[eluser]PaulBY[/eluser]
Thank you! It works.
Code:
$this->db->select('COALESCE( categories.id, 1)',false);




Theme © iAndrew 2016 - Forum software by © MyBB