Title: Errors in calculations
Last modified: August 21, 2016

---

# Errors in calculations

 *  Resolved [notyet1](https://wordpress.org/support/users/notyet1/)
 * (@notyet1)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-in-calculations/)
 * Hi,
 * Great product, but im hitting a couple of errors, the first happens when i run
   a re calculation of scores, im seeing this message
 * Something went wrong while (re)calculating the scores. Please check if TRUNCATE/
   DROP or DELETE rights are available at the database and try again.
    Ive read 
   the topic already on this, but im in the middle of the world cup with 400 users
   and dont want to risk a re install.
 * Im also seeing the rankings do weird stuff and not display in the correct order
 * Notyet1
 * [https://wordpress.org/plugins/football-pool/](https://wordpress.org/plugins/football-pool/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-in-calculations/#post-5047838)
 * If you post the actual error messages (see [this topic](http://wordpress.org/support/topic/please-read-this-first))
   I can help.
 *  Thread Starter [notyet1](https://wordpress.org/support/users/notyet1/)
 * (@notyet1)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-in-calculations/#post-5047847)
 * Hi Antoine,
 * Ive tried adding your code for debug, but no files are being generated in wp-
   content!
 * the error message i am seeing is as follows
 * > Something went wrong while (re)calculating the scores. Please check if TRUNCATE/
   > DROP or DELETE rights are available at the database and try again.
 * I am also seeing the rankings in random order on the ranking page and in widgets
 * notyet1
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-in-calculations/#post-5047880)
 * If the calculation is not completed, then the rankings won’t be right. One of
   the steps in the calculation process is to calculate the rankings of the players
   over time based on their scores.
 * If no errors are logged, then my best guess is that you run into a server time-
   out.
 * You can try to add the following lines to your wp-config and lower the values(
   the values posted here are the defaults).
 *     ```
       define( 'FOOTBALLPOOL_RECALC_STEP2_DIV', 50 ); // add match results for players
       define( 'FOOTBALLPOOL_RECALC_STEP3_DIV', 100 ); // calculate scores for match results
       define( 'FOOTBALLPOOL_RECALC_STEP4_DIV', 50 ); // calculate scores for bonusquestions
       define( 'FOOTBALLPOOL_RECALC_STEP5_DIV', 50 ); // history of score over time
       define( 'FOOTBALLPOOL_RECALC_STEP6_DIV', 4 ); // history of ranking over time
       ```
   
 * The most time-consuming steps are step 5 and 6. So start with lowering those 
   values.
 * A lower value will cause the script to divide the calculation in smaller sub 
   steps.
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-in-calculations/#post-5047881)
 * If the calculation is not completed, then the rankings won’t be right. One of
   the steps in the calculation process is to calculate the rankings of the players
   over time based on their scores.
 * If no errors are logged, then my best guess is that you run into a server time-
   out.
 * You can try to add the following lines to your wp-config and lower the values(
   the values posted here are the defaults).
 *     ```
       define( 'FOOTBALLPOOL_RECALC_STEP2_DIV', 50 ); // add match results for players
       define( 'FOOTBALLPOOL_RECALC_STEP3_DIV', 100 ); // calculate scores for match results
       define( 'FOOTBALLPOOL_RECALC_STEP4_DIV', 50 ); // calculate scores for bonusquestions
       define( 'FOOTBALLPOOL_RECALC_STEP5_DIV', 50 ); // history of score over time
       define( 'FOOTBALLPOOL_RECALC_STEP6_DIV', 4 ); // history of ranking over time
       ```
   
 * The most time-consuming steps are step 5 and 6. So start with lowering those 
   values.
 * A lower value will cause the script to divide the calculation in smaller sub 
   steps.
 *  Thread Starter [notyet1](https://wordpress.org/support/users/notyet1/)
 * (@notyet1)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-in-calculations/#post-5047895)
 * Hi Antoine
 * Its working to a degree, all functions are fine with above settings, except the
   last, which ive lowered to 1 This is getting past the first ranking but its hanging
   on the update ranking 2 step 40+
 * Thanks
    Notyet1
 *  Thread Starter [notyet1](https://wordpress.org/support/users/notyet1/)
 * (@notyet1)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-in-calculations/#post-5047896)
 * ok, was running the update again while typing that last message, and its now 
   completed.
 * Thanks
    Notyet1
 *  Plugin Author [AntoineH](https://wordpress.org/support/users/antoineh/)
 * (@antoineh)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-in-calculations/#post-5047904)
 * I sure hope it keeps working, because there is no more lowering of the values
   after 1.
 * I haven’t seen this before with 400 users. I’ve heard of installs with a lot 
   more users that also work with the default settings.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Errors in calculations’ is closed to new replies.

 * ![](https://ps.w.org/football-pool/assets/icon-256x256.png?rev=983880)
 * [Football Pool](https://wordpress.org/plugins/football-pool/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/football-pool/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/football-pool/)
 * [Active Topics](https://wordpress.org/support/plugin/football-pool/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/football-pool/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/football-pool/reviews/)

## Tags

 * [truncate](https://wordpress.org/support/topic-tag/truncate/)

 * 7 replies
 * 2 participants
 * Last reply from: [AntoineH](https://wordpress.org/support/users/antoineh/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/errors-in-calculations/#post-5047904)
 * Status: resolved