title: Advanced search code does not bring relevant results (Codeigniter)
body: <p>I have written this CodeIgniter code for an advanced search. this advanced search has only a list of provinced for the uses to select from. But, I have problem, when searching, it brings results from other cities not selected by the user. Here is the code to match for the term:</p>
  
  <pre><code>$db-&gt;or_like("title", $_POST['search-term']); // OR 
  $db-&gt;or_like("content", $_POST['search-term']);   // OR 
  $db-&gt;or_like("name", $_POST['search-term']);    // OR   
  $db-&gt;or_like("keywords", $_POST['search-term']);    // OR
  </code></pre>
  
  <p>And here is part of code responsible for matching with the selected province:</p>
  
  <pre><code>if(isset($_POST['province']) &amp;&amp; $_POST['province'] != "0")
          { 
              $db-&gt;where("province", $_POST['province']); 
              if(isset($_POST['cities']) &amp;&amp; $_POST['cities'] != "0")
              {
              $db-&gt;where("city", $_POST['cities']);   
              }
          } // AND    
  </code></pre>
  
  <p>And here is the code responsible for getting the data into an array:</p>
  
  <pre><code>$search_result = $db-&gt;get("ads")-&gt;result_array();
  </code></pre>
  
  <p>It is also worth mentioning that when I change the <code>or_like</code> to <code>like</code> it yields no result.</p>
  
  <p>Here is the generated QUERY:</p>
  
  <pre><code>SELECT * FROM (`ads`) WHERE `status` = 2 AND `province` = '5' AND `title` LIKE '%شریف%' OR `content` LIKE '%شریف%' OR `name` LIKE '%شریف%' OR `keywords` LIKE '%شریف%' ORDER BY `stars` DESC
  </code></pre>
  
  <p>It seems to be sound and OK, but the results are not...     </p>