Forums

Discussions of the easy to use open source game control panel.

You are not logged in.

Announcement

Welcome on board ! We are very proud to present you our forums powered by FluxBB ! Please Register, do not forget to read carefully Forum Rules and feel free to Contact Us if you see any problems. Finally, take part in site life !

#1 2015-03-31 19:25:24

Ramstin
Member
Registered: 2014-04-12
Posts: 6

removing old data

hello, i've been trying to remove the old data from my box charts, i found this inside cron.php

// Remove old data

$time = (time() - (60 * 60 * 24 * 7 * 4 * 3 + 3600) - 10800);
$numOldData = mysql_num_rows(mysql_query( "SELECT `id` FROM `".DBPREFIX."boxData` WHERE `timestamp` < '".$time."'" ));

if ($numOldData > 0)
{
        $oldData = mysql_query( "SELECT `id` FROM `".DBPREFIX."boxData` WHERE `timestamp` < '".$time."'" );
        while ($rowsData = mysql_fetch_assoc($oldData))
        {
                query_basic( "DELETE FROM `".DBPREFIX."boxData` WHERE `id` = '".$rowsData['id']."'" );
        }
        unset($oldData);
}

can anyone explain me how it works? because i have so many records that i think that is not working correctly or maybe its not automatic.

thanks a lot.

martin

Offline

Board footer

Powered by FluxBB