• Hi – I have a feeling this might have been answered somewhere before but I can’t find something via search, so here I go (again): how can I find out how many people have entered (and saved) predictions before the deadline has expired?

    Unfortunately, I can’t install plugin extensions on my site (it’s a multi-site instance), so is there a way via the regular plugin itself?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author AntoineH

    (@antoineh)

    Unfortunately, there is no way via the standard plugin. Only thing you can do, if you have access to phpMyAdmin or you have a plugin like Database Browser installed, is to output the following SQL query (based on the standard DB prefixes of WP) to report the number of predictions per user:

    SELECT
      u.ID AS <code>User ID</code>, 
      u.display_name AS <code>User Name</code>, 
      COUNT( * ) AS <code>Nr of predictions</code>
    FROM pool_wp_predictions p
    INNER JOIN wp_users u ON ( u.ID = p.user_id )
    GROUP BY p.user_id

    This query just outputs every user in the database. It does not take into account that some users may be excluded from the pool.

    For people that find this topic via the search and are able to install plugins. I have two extensions that show a simple report with predictions in the admin:
    https://www.dropbox.com/s/g5o4prymfuxqat4/football-pool-admin-predictions-count.php?dl=0
    https://www.dropbox.com/s/cnln3gd2mlh8mfx/football-pool-predictions.php?dl=0

    The SQL query above is copied from the first plugin.

    I think that the easiest way is to look through phpMyAdmin, there you can sort all prediction by match id or whatever and see how many predictions there are.

    Plugin Author AntoineH

    (@antoineh)

    I see that the forum ruined my code. SQL should be:

    
    SELECT
      u.ID AS User_ID, 
      u.display_name AS User_Name, 
      COUNT( * ) AS Nr_of_predictions
    FROM pool_wp_predictions p
    INNER JOIN wp_users u ON ( u.ID = p.user_id )
    GROUP BY p.user_id
    • This reply was modified 6 years, 9 months ago by AntoineH.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Find out how many people have entered predictions’ is closed to new replies.