title: MySQL | LEFT JOIN wp_posts and wp_postmeta
body: <p>I like to LEFT JOIN both tables, wp_posts and wp_postmeta. In my posts i have create several meta box options.</p>
  
  <p>Lets say I have create a custom post type called "ads" and for each ad, i have the publication date and the expiration date as meta options.</p>
  
  <p>the question is, how can I join the two tables, in order to get the ID of the post, from the wp_posts table where the current date is higher than the start date in the post meta table and lower than the expiration date in the post meta table.</p>
  
  <p>for non WP users the wp_posts table is a traditional table, where each row represents a post and the wp_postmeta is a key value pare table where based on the post id, contains more than one row to describe the meta options of the post.</p>
  
  <p>Is there a way to make that query in a single MySQL Query ?</p>
  
  <p>kind regards.</p>