Support

Account

Forum Replies Created

  • 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')
Viewing 1 post (of 1 total)