Webmastersite.net
Register Log In

hits-in toplist without reset

Comments on hits-in toplist without reset

sertan6
Experienced

Usergroup: Customer
Joined: Feb 22, 2004

Total Topics: 47
Total Comments: 88
sertan6
Posted Apr 22, 2005 - 4:34 PM:

Hello Paul,

i want to make a toplist using the 'hitsintemp' field where my traders hits-in wont reset.
i want to do that by copying the 'hitsintemp' to a new field 'previoushitsin' just
before 'hitsintemp' field resets.
Then i will list them according to
'importortance'='hitsintemp' + 'previoushitsin'
so at all times the toplist will use the last 24-48hours hits-in (for 1 day 'hitsintemp' range).

i tried to change in timedactions.php
--------------------------------------------------------------------------------
if ( (time() - ($settings->hitstempdays * 86400)) > $settings->hitstempreset)
{
// reset temporary hits counters

//-------------------my code
$db->update('linkstable', 'previoushitsin', 'hitsintemp', 'id>0');
//-------------------

$db->update('linkstable', 'hitsouttemp', '0', 'id>0');
$db->update('linkstable', 'hitsintemp', '0', 'id>0');
$settings->hitstempreset = time();
$settings->update('hitstempreset');
}
---------------------------------------------------------------------------------

but it's not working, any idea how i could do this?

thanks
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 23, 2005 - 2:38 PM:

hitsintemp is probably being considered a string. Try $db->query("UPDATE wsnlinks_links SET previoushitsin = hitsintemp");
sertan6
Experienced

Usergroup: Customer
Joined: Feb 22, 2004

Total Topics: 47
Total Comments: 88
sertan6
Posted Apr 24, 2005 - 3:48 AM:

it works, thanks Paul
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.