title: odbc_exec() and odbc_fetch_row() error
body: <p>I'm getting 2 painfully annoying errors:</p>
  
  <blockquote>
    <p>PHP Warning: odbc_exec(): SQL error: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt, SQL state S1000 in SQL ExecDirect in blahblah on Line 22</p>
    
    <p>PHP Warning: odbc_fetch_row() expects parameter 1 to be resource, boolean given</p>
  </blockquote>
  
  <p>BUT, then it goes ahead and lists everything that I'm looking for in that column. I really just need to know how to clean up my results so that I can then start sifting through them.</p>
  
  <pre><code>$conn =     odbc_pconnect("$driver;Server=$server;Database=$database;MARS_Connection=yes",     $user, $password);
  if ($conn) {
      echo "Connection established.";
  } else{
      die("Connection could not be established.");
  }
  $sql = 'SELECT t_item FROM erplnfp7.twhinr140600';
  $outval = odbc_columns($conn, "erplnfp7", "%", "twhinr140600", "%");
  $pages = array();
  while (odbc_fetch_into($outval, $pages)) {
      echo $pages[3] . PHP_EOL;
      $q = 'SELECT t_item FROM twhinr140600'; 
      $cur = odbc_exec($conn,$q); 
      while(odbc_fetch_row($cur)){ 
          $CommSettings = odbc_result($cur,'t_item'); 
          echo "$CommSettings"; 
      }
  }
  
  
  odbc_close($conn);
  </code></pre>
  
  <p>Thanks</p>