Home Forums Front-end Issues Nesting relationship querys Reply To: Nesting relationship querys

  • I am printing my query out and this is what its selecting in the db
    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)
    INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id) WHERE 1=1 AND wp_posts.post_type = ‘videos’ AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘private’) AND ( (wp_postmeta.meta_key = ‘speaker’ AND CAST(wp_postmeta.meta_value AS CHAR) = ‘161’)
    AND (mt1.meta_key = ‘event’ AND CAST(mt1.meta_value AS CHAR) = ’43’) ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10

    but i cannot get anything to print