Welcome Guest, Not a member yet? Register   Sign In
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





Messages In This Thread
CI_DB_active_record:generation of OR AND is not correct, If we want to use or_like we still get AND - by El Forum - 11-09-2011, 12:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB