title: PHP / CodeIgniter - deleting a record based on multiple WHERE conditions via array of data
body: <p>I am using PHP/Code Igniter for my project and I am trying to figure out the best way to handle this query.</p>
  
  <p>I have an array of data that I want to use as my <code>WHERE</code> clause for deleting a record.</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [CustomerID] =&gt; 8
              [Denomination] =&gt; 40
          )
  
      [1] =&gt; Array
          (
              [CustomerID] =&gt; 9
              [Denomination] =&gt; 425
          )
  
  )
  </code></pre>
  
  <p>I am trying to do something like so:</p>
  
  <pre><code>public function remove_customers_from_order($formData){
          $this-&gt;db
          -&gt;where($formData)
          -&gt;delete("customer_rewards");
      }
  </code></pre>
  
  <p>Is there a more effective way than to do a loop and delete each time? <code>CustomerID</code> and <code>Denomination</code> both match the column names for my WHERE clause.</p>
  
  <p><strong>Desired Result:</strong></p>
  
  <p><code>DELETE FROM customer_rewards WHERE CustomerID = 8 AND Denomination = 40;
   DELETE FROM customer_rewards WHERE CustomerID = 9 AND Denomination = 425;
  </code></p>
  
  <p><strong>Error:</strong></p>
  
  <p>When running it like this, I am getting the following error: <code>Array to string conversion database/DB_query_builder.php</code></p>