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
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.