title: How to insert value of subquery using Active Record?
body: <p>i use Active record for inserting values to DB.</p>
  
  <p>All other type of queries i do with custom query as it's much easier but the active record insert is quite nice.</p>
  
  <p>So i have this code :</p>
  
  <pre><code>    $comment = array (
  'point_id' =&gt; $object-&gt;id,
  'title' =&gt; $object-&gt;title,
  'comment' =&gt; $object-&gt;comment,
  'author_name' =&gt; $object-&gt;author_name,
  'is_temp' =&gt; 0,
  'parent_id' =&gt; $object-&gt;parent_id
  
  );
  return $this-&gt;db-&gt;insert('comments', $comment);
  </code></pre>
  
  <p>Now i want to be able to set is_temp as a subquery result, which is :</p>
  
  <pre><code>(SELECT allow_user_comments from subjects where id='somevalue')
  </code></pre>
  
  <p>How would one achive that?</p>
  
  <p>I was hoping to avoid using third party libraries.</p>