Welcome Guest, Not a member yet? Register   Sign In
IF I want to add ( ) between condition, How I can do this?
#4

[eluser]Pert[/eluser]
At the moment there is no way to add brackets in Active Records.

The closest you can do is

Code:
$this->db->where('(table_a.col_a = \'a\' OR table_b.col_b = \'b\')', null, false);

You have to remember to escape your values manually.


Messages In This Thread
IF I want to add ( ) between condition, How I can do this? - by El Forum - 06-07-2013, 01:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB