CodeIgniter Forums
Group LIKE in CI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Group LIKE in CI (/thread-47097.html)



Group LIKE in CI - El Forum - 11-25-2011

[eluser]dchankhour[/eluser]
Hi,

I'm looking to group LIKE using CI sytax.

For example, i would like to generate the following query:

select * from table where (c1 = 0 and c2 = 1) AND (c3 LIKE %test% or c4 LIKE %test)

It seems that CI will always do OR or AND and there is no way of grouping.

Any help is appreciated.