title: Drupal: Return SQL string from db_query
body: <p>Is it possible to return the actual SQL query as a string from the result of db_query?</p>
  
  <p>Or otherwise take the returned resource ID from db_query and get the SQL string?</p>
  
  <hr>
  
  <p><strong>Edit:</strong></p>
  
  <p>As an addendum, I recently found out about <code>db_queryd()</code> from the Devel module, which echoes the query passed (as well as execute it).  Doesn't return the string as this question asked, but really helpful for copying and pasting a complete query.</p>