• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI_DB_active_record:generation of OR AND is not correct, If we want to use or_like we still get AND

#1
[eluser]Unknown[/eluser]
Hello, I found one thing, maybe bug.

Code:
or_where(k,v);
or_like(k1,v1);

result:
Code:
WHERE k=v AND (NOT OR as expected) k1=v1
because

(Line 685 CI_DB_active_record)
Code:
$prefix = (count($this->ar_like) == 0) ? '' : $type;

What if
Code:
(count($this->ar_where) > 0
?

If we want to use or_like we still get AND

I hope my problem is clear





Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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