title: Retrieve data from custom table
body: <p>I am trying to use the following code to retrieve data from a custom table in WordPress:</p>
  
  <pre><code>$myrows = $wpdb-&gt;get_results( "SELECT id, name FROM mytable" );
  </code></pre>
  
  <p>The result set is empty, even though there is data in the table. Getting data from the database for the WordPress internal tables works without a problem.</p>
  
  <p>For example, the following works without a problem:</p>
  
  <pre><code>$posts = $wpdb-&gt;get_results("SELECT ID, post_title FROM $wpdb-&gt;posts WHERE post_status = 'publish' AND post_type='post' ORDER BY comment_count DESC LIMIT 0,4");
  </code></pre>
  
  <p>Any thoughts on how to diagnose the issue?</p>