Pages: [1]
Author Topic: daily stats problem  (Read 336 times)
Customers
Newbie
*

Karma: 0
Posts: 5


Email
on: May 16, 10, 01:28 AM

Hi,

i got a problem with the daily gameplay statistics. They are still 0 gameplay today. Total gameplays is working fine. In the database is on play_today on every game 0.

Can you please help me solve this problem?

Thanks
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #1 on: May 17, 10, 08:23 AM

PM me your domain name please
Logged
Customers
Newbie
*

Karma: 0
Posts: 5


Email
Reply #2 on: May 17, 10, 10:52 AM

hi sergey.
My site name is: www.gejmy.cz
« Last Edit: May 17, 10, 10:59 AM by eth4rendil » Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #3 on: May 18, 10, 12:47 AM

are there still 0 gameplays for today?
Logged
Customers
Newbie
*

Karma: 0
Posts: 5


Email
Reply #4 on: May 18, 10, 11:14 AM

yes there are still 0 gameplays today,

# 0 dnes
dnes - today gameplays


# 3737 hran?
- hrani - total gameplays

Totalgameplays is working, today gameplays not...

i did a little test and i find that something on the root page ist deleting the daily statistics. Then somenhing on the main page is deleting the daily stats.  What can it be?
« Last Edit: May 19, 10, 02:22 AM by eth4rendil » Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #5 on: May 21, 10, 02:55 AM

that's extremely strange because Totalgameplays is the sum of day totals of each game. Try to install a fresh unmodified version of the script on a local server (like this one: http://www.wampserver.com/) and check the results.
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #6 on: May 23, 10, 12:56 AM

I think I've found the reason of your problem... please try to replace the line
Code:
$res = $db->super_query( "SELECT COUNT(*) as number FROM ".$cMain["dbPrefix"]."users WHERE joined = NOW()" );
(admin/index.php, around 60th line) by this one:
Code:
$res = $db->super_query( "SELECT COUNT(*) as number FROM ".$cMain["dbPrefix"]."users WHERE ".time()."-joined<86400" );
Logged
Customers
Newbie
*

Karma: 0
Posts: 5


Email
Reply #7 on: May 31, 10, 02:35 AM

Dear Sergey
I used your setting, but the problem with daily stats still persists. After starting a game, it adds 1+gameplay to today's game played (in the table pas_games), but viewing the index page deletes the daily gameplays at all games . What php file does it (the deleting)?  I thing thah the problem should be there.


Thanks
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #8 on: May 31, 10, 08:26 AM

Ondrej, check the "cron.php" file in the "include" folder. It contains the only parameter inside - the date of the last stats' reset. If the script can't write to that file (adjust its attributes if necessary), it can't "remember" that there is on need to reset stats again today and resets each time someone visits your front page.
Logged
Pages: [1]
 
Jump to: