XFileSharing Pro - delete old unverified transactions using cron

Powerfull XFileSharing version

Moderator: admin

Message
Author
Eskick
Posts: 86
Joined: Mar 10, 2009 11:47 am

delete old unverified transactions using cron

#1 Postby Eskick » Jul 06, 2009 9:32 pm

Hi is it possible for anyone to provide a code to add to cron.pl so the cron checks the last x day for example i dont want any unverified transactions which is over 20 days old and cron will execute the code everytime it starts.

you could also update the new version with the code if anyone or you provide it.

hscorp
Posts: 143
Joined: Nov 12, 2008 5:36 pm
Contact:

#2 Postby hscorp » Jul 06, 2009 10:06 pm


Eskick
Posts: 86
Joined: Mar 10, 2009 11:47 am

#3 Postby Eskick » Jul 07, 2009 3:56 am


i just need a modification mate, i dont plan to upgrade my script to any other version as i cannot its impossible due to my version of the script being modified too much

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#4 Postby PilgrimX182 » Jul 07, 2009 6:54 am

In cron.pl find:

Code: Select all

# Delete old reports

and add below:

Code: Select all

$db->Exec("DELETE FROM Transactions WHERE created<NOW() - INTERVAL 20 DAY");

Eskick
Posts: 86
Joined: Mar 10, 2009 11:47 am

#5 Postby Eskick » Jul 07, 2009 9:32 am

PilgrimX182 wrote:In cron.pl find:

Code: Select all

# Delete old reports

and add below:

Code: Select all

$db->Exec("DELETE FROM Transactions WHERE created<NOW() - INTERVAL 20 DAY");

i would say thanks bu you just made my problem worse as it deleted every report older than 20 days not older than 20 and not sproved

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#6 Postby PilgrimX182 » Jul 07, 2009 10:04 am

lol, sorry bout this :) Too hot here today.

Here goes correct one:

Code: Select all

$db->Exec("DELETE FROM Transactions WHERE created<NOW() - INTERVAL 20 DAY AND verified=0");


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests