- // Get current points
- $result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FUNCTION__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
- // Create line
- SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_jackpot` (ok, points) VALUES ('ok', 0.00000)", __FUNCTION__, __LINE__);
- } else {
- // Read points
- list($jackpot) = SQL_FETCHROW($result);
- if ($jackpot >= $points) {
- // Update points when there are enougth points in jackpot
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_jackpot` SET points=points-%s WHERE ok='ok' LIMIT 1",
+ // Get jackpot points for dummy
+ $jackpot = GET_JACKPOT_POINTS();
+
+ // Enougth points i jackpot?
+ if ($jackpot >= $points) {
+ // Update points when there are enougth points in jackpot
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_jackpot` SET `points`=`points`-%s WHERE `ok`='ok' LIMIT 1",