Answers.Body: <p>You can do multiple not like statements using api4</p>
  <p><a href="https://i.sstatic.net/E3QwD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/E3QwD.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-14T15:16:19.793Z
Answers.LastActivityDate: 2022-01-14T15:16:19.793Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>Hi I am using Civicrm api v3. I am trying NOT Like condition with single condition it is working. But i need to apply two conditions with string1 and string2.</p>
  <pre><code>    $contribution = civicrm_api3('Contribution', 'get', [
          'sequential' =&gt; 1,
          // 'financial_type_id' =&gt; &quot;Donation&quot;,
          'receive_date' =&gt; ['BETWEEN' =&gt; [&quot;01-01-2021 00:00:00&quot;, &quot;31-12-2021 23:59:59&quot;]],
          'contact_id' =&gt; $contact_id,
          'contribution_status_id' =&gt; &quot;Completed&quot;,
          'source' =&gt; ['NOT LIKE' =&gt; &quot;%string1%&quot;],
         'source' =&gt; ['NOT LIKE' =&gt; &quot;%string2%&quot;],
          'options' =&gt; ['limit' =&gt; 5000, 'sort' =&gt; &quot;receive_date ASC&quot;],
      ]);
  </code></pre>
  
Tags: <api><php>
Title: Is there any way to apply two "NOT Like" conditions in Civicrm API?
ThreadText: # Is there any way to apply two "NOT Like" conditions in Civicrm API?
  
  (Asked by: username_0 on 2022-01-14)
  
  Hi I am using Civicrm api v3. I am trying NOT Like condition with single condition it is working. But i need to apply two conditions with string1 and string2.
  
  ```
      $contribution = civicrm_api3('Contribution', 'get', [
          'sequential' => 1,
          // 'financial_type_id' => "Donation",
          'receive_date' => ['BETWEEN' => ["01-01-2021 00:00:00", "31-12-2021 23:59:59"]],
          'contact_id' => $contact_id,
          'contribution_status_id' => "Completed",
          'source' => ['NOT LIKE' => "%string1%"],
         'source' => ['NOT LIKE' => "%string2%"],
          'options' => ['limit' => 5000, 'sort' => "receive_date ASC"],
      ]);
  
  ```
  
  **Tags:** api, php
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-01-14. Score: 1 | Accepted answer
  
  You can do multiple not like statements using api4
  
  [![enter image description here](https://i.sstatic.net/E3QwD.png)](https://i.sstatic.net/E3QwD.png)
  
  
  ---
  
  