Calculating Match ratio, based on CPT with ACF custom fields.
-
Hey guys,
I have a troublesome feature request for which I can’t find the optimal solution.
Basically there’s a CPT Match which has several ACF custom fields, that give one the ability to specify the outcome of each match.
The custom set up goes as follows:
Each Match can have a winner specified, which is a simple select of all available Teams. Each Team is stored as a Custom Taxonomy.
There are two checkboxes Draw and Pending.
Now each user can specify the outcome of any match before it has occured, say one can bet on the outcome.
Based on his bets and the real outcome I’m to calculate the win / lose ratio for each user Tipps to verify his credibility.
This ratio is then printed out below each Match based on the user data provided.
My main issue here is the fact that I can’t simply fetch all the matches from the DB and then calculate the ratio.
Why?
Because the query may be extremely slow with increasing volume of posts.
Matches that were cancelled should be remove from this ratio.Have you any suggestion on the best approach to that problem?
I will appreciate any in-depth ideas,
Regards,
Rafal Gicgier
- The topic ‘Calculating Match ratio, based on CPT with ACF custom fields.’ is closed to new replies.