Welcome Guest, Not a member yet? Register   Sign In
CI 1.6.1 -> DB_active_rec.php -> TRUE instead of FALSE in function "or_where_not_in"
#1

[eluser]Unknown[/eluser]
hye,
i am not english. So, sorry for my poor english language.

The bug is localized in the file DB_active_rec.php at line 540

Code:
function or_where_not_in($key = NULL, $values = NULL)
{        
   return $this->_where_in($key, $values, FALSE, 'OR ');
}

The correction is :
Code:
function or_where_not_in($key = NULL, $values = NULL)
{        
    return $this->_where_in($key, $values, TRUE, 'OR ');
}

Best regards
#2

[eluser]Derek Allard[/eluser]
Could you explain a bit more about why you feel this is incorrect jchouix?
#3

[eluser]Seppo[/eluser]
Hey Derek,
I also think it's a bug... The third parameter is $not and described as "If the statement whould be IN or NOT IN", and right now or_where_not_in does exactly the same thing as or_where_in and you can test it

Code:
$this->db->where('field', 'value');
        $this->db->or_where_not_in('a', array(1,2,3));
        echo $this->db->_compile_select();
// Produces
// SELECT * WHERE `field` = 'value' OR `a` IN (1, 2, 3)
// and should produce
// SELECT * WHERE `field` = 'value' OR `a` NOT IN (1, 2, 3)
#4

[eluser]Derek Allard[/eluser]
Cool, if you feel its a bug, could I trouble you to file a bug report? Sorry, but I'm head-deep in development for SxSW this weekend, and I won't get to this before then. Thanks.
#5

[eluser]Seppo[/eluser]
Already done =) I can see you are too busy with SxSW =P

-Edit- I put the link: http://codeigniter.com/bug_tracker/bug/4171/




Theme © iAndrew 2016 - Forum software by © MyBB