Home › Forums › Add-ons › Repeater Field › Query to retrieve fields in same row in repeater › Reply To: Query to retrieve fields in same row in repeater
I was stuck on a similar issue, thanks for your post I solved it with a little modification
SELECT COUNT(*) as total from wp_postmeta pm1 INNER JOIN wp_posts ON ( wp_posts.ID = pm1.post_id )
INNER JOIN wp_postmeta pm2 ON (pm1.post_id = pm2.post_id)
WHERE( pm1.meta_key LIKE 'planilla_%_jugador' AND pm1.meta_value = 420 )
AND (pm2.meta_key LIKE 'planilla_%_minutos_jugados' and pm2.meta_value > 0)
AND (REPLACE(pm1.meta_key,'_jugador','') = REPLACE(pm2.meta_key,'_minutos_jugados',''))
AND wp_posts.post_type = 'partido' AND ((wp_posts.post_status = 'publish')
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.