title: How to replace update SQL query to CodeIgniter ActiveRecord?
body: <p>I use the CodeIgniter framework. I have a problem, when I try to update database using Active Record.
  I found out how to resolve it via raw SQL.</p>
  
  <pre><code>UPDATE articles_articlegroups
    SET isDeleted = 1
      WHERE articlegroupId IN (
        SELECT id
        FROM articlegroups
        WHERE parent_id = $catID
        )
  </code></pre>
  
  <p>But I need use AR.</p>
  
  <p>I nave category and subcategory with articles. Category and subcategory are in one table. Linked with <code>parent_id.</code>
  Articles links are in one to many table, because its can belong to different categories.</p>
  
  <p>Would like to delete all articles, know just <code>parent_id.</code></p>