title: Typo3 extbase sql_fetch_assoc error
body: <p>In Typo3 version 6.1, I have written some custom queries in My extension Repository</p>
  
  <p>for example in file Mytest/Classes/Domain/Repository/MytestRepository.php</p>
  
  <pre><code>class MytestRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
   public function myFunction(){
  
          $sql = 'SELECT * FROM some_table ';
  
          $sqlResult = $GLOBALS['TYPO3_DB']-&gt;sql_query($sql);
          while($row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_assoc($sqlResult)) {
                  $rowone = $row['rowone'];
          }
   }
  }
  </code></pre>
  
  <p>And calling that function in controller</p>
  
  <pre><code>$test = $this-&gt;MytestRepository-&gt;myFunction();
  </code></pre>
  
  <p>But the issue here is, I am getting error </p>
  
  <pre><code>Fatal error: Call to a member function fetch_assoc() on a non-object in /home/src/typo3_src-6.1.1/typo3/sysext/core/Classes/Database/DatabaseConnection.php on line 1029 
  </code></pre>
  
  <p>Anybody have the solution ?
  Thanks in advance.</p>