title: Wordpress - How do I output the last query used by query_posts?
body: <p>I am attempting to grab all posts for a specific day (ie: today), however for some reason it is only returning the one.</p>
  
  <pre><code>$wp_posts = query_posts(array(
              'cat' =&gt; 4,
              'post_status' =&gt; array('any', 'publish', 'future', 'inherit', 'revision', 'pending'), 
              'year' =&gt; '2011',
              'monthnum' =&gt; '10',
              'day' =&gt; '25',                  
              'order_by' =&gt; 'post_date',
              'order' =&gt; 'ASC'
              ));
  </code></pre>
  
  <p>This should post all the posts for today under a category, but whatever reason it only outputs 1 post and I do not know why. </p>
  
  <p>At first I thought it might be a permalink issue, but I removed the permalinks and its still only returning the one post?</p>
  
  <p>On my localhost the code works fine and outputs all the content required for a specific day.</p>
  
  <p>Additionally, I have checked the database and all the posts for the day are there and appear to be in schedule or posted status.</p>
  
  <p>So there is no reason why the query_posts should be returning just 1 item.</p>
  
  <p>I want to output the last query used by query_posts to investigate what is causing the problem.</p>
  
  <p>How do I verbosely output the last query as used by query_posts?</p>
  
  <p>Thanks.</p>
  
  <p>Edit.</p>
  
  <p>I will accept an answer that converts the above to a verbose SQL query which I can run to see what is going on</p>