title: proper use of get_records in moodle
body: <p>I wonder how can I find my moodle's database contents.</p>
  
  <p>I want to elaborate users etc.</p>
  
  <p>My first try is with PHP code using <code>global $DB</code> but there is an error message:</p>
  
  <blockquote>
    <p>Fatal error: Call to a member function get_record() on a non-object in C:\xampp\htdocs\test.php on line 3</p>
  </blockquote>
  
  <p>I use the <code>getrecord()</code> function but I didn't do it right.</p>
  
  <p>Can anybody help me? The name of my database is "base".</p>
  
  <blockquote>
    <p>Note: moodle version is 2.7.2</p>
  </blockquote>