title: How to retrieve a value from the database function in joomla module?
body: <p>How do I retrieve a value from the <code>database</code> function in <code>joomla</code> <code>module</code>?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$indirect = "select GetAncestry('".$userID."');";
  $db-&gt;setQuery($indirect);
  
  $getVal  = $db-&gt;query();
  echo "getVal" . $getVal ."&lt;br&gt;";//process breaks here
  </code></pre>