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

[eluser]Unknown[/eluser]
I use CI Active Database to select data from condition below

Code:
$this->select()->from('table')->where('fieldA != "dataA1"')->like('fieldB', $input)->or_like('fieldC',$input);

// Geberates QUERY
SELECT * FROM table WHERE fieldA != "dataA1" AND "fieldB" LIKE '%$input%' OR "fieldC" LIKE '%$input%';

but I want to Add (), becuase I don't want to show some data from first condition, but still show.
how I can do that


Messages In This Thread
IF I want to add ( ) between condition, How I can do this? - by El Forum - 04-04-2013, 08:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB