title: Query using CodeIgniter's Active Record not returning a value…
body: <p>Here's the code I'm running.</p>
  
  <pre><code>$query = $this-&gt;db-&gt;query("DECLARE @tmp TABLE (ContactID UNIQUEIDENTIFIER)
  INSERT INTO tblCD (" . ArrayToString($fieldsCDArray) . ")
  OUTPUT Inserted.ContactID INTO @tmp
  VALUES (" . ArrayToDBString($valuesCDArray) . ")
  INSERT INTO tblCCO (ContactID, " . ArrayToString($fieldsCCOArray) . ")
  VALUES ((SELECT ContactID FROM @tmp), " . ArrayToDBString($valuesCCOArray) . ")
  SELECT ContactID FROM @tmp");
  
  $result = $query-&gt;row(); 
  </code></pre>
  
  <p>I've ran $this->db->last_query() to verify that the SQL code actually works in SQL server. It ends up returning a single row, as expected. But I get nothing returned from CodeIgniter with the above code. I've also tried running it with result() and result_array() just for kicks, and still nothing.</p>
  
  <p>Does CodeIgniter not like returning results from a query with more than one statement in it or do I have to get the result a different way? (For anyone asking, I’m just trying to get the last inserted id but it's a GUID so I can't use $this->db->insert_id().</p>
  
  <p>Any help or suggestions would be appreciated. Thanks.</p>
  
  <p>Also, ignore the ArrayToDBString() methods, those are definitely not the issues since, like I said, I've printed the last query and ran it through SQL successfully. Also, the result I get when running it through SQL is a single column called ContactID.</p>