• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI 1.6.1 -> DB_active_rec.php -> TRUE instead of FALSE in function "or_where_not_in"

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

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

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

Best regards

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

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

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

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

Already done =) I can see you are too busy with SxSW =P

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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.