TBDev Forum
Programming board
Main Page Forum Rules Privacy Policy Members Contact Us
Welcome Guest (Login | Register)
TBDev Forum TBDev.net - Help *nix based Installations complete torrents Problem

complete torrents Problem

2006-11-08 13:42:00
Group: Member
Posts: 158
Topics participated: 85
Topics started: 14
First post: 2006-02-25 16:30:00
Last post: 2008-09-25 15:43:00
Hello guys i have a little problem with the completed torrents in my userdetails.php....After a crash on my Host all torrents were deleted but the Database was up to date and now all torrents that don
 
2006-11-08 15:20:00
Group: Member
Posts: 2607
Topics participated: 1470
Topics started: 2
First post: 2006-07-10 10:45:00
Last post: 2008-06-13 17:08:00
SQL
TRUNCATE TABLE `completed`;


or what ever that table name is
 
2006-11-08 15:42:00
Group: Member
Posts: 158
Topics participated: 85
Topics started: 14
First post: 2006-02-25 16:30:00
Last post: 2008-09-25 15:43:00
Noooo that deltes the table ;)

or it deletes the inserts of this Table but i want to delete entrys where the torrent file is deltete......
 
2006-11-08 16:56:00
Group: Member
Posts: 2607
Topics participated: 1470
Topics started: 2
First post: 2006-07-10 10:45:00
Last post: 2008-06-13 17:08:00
in the delete torrents whan dead / 28 days / what ever add a

delete from completed where id=$arr["id"]

or what ever the $arr is and how the id is a torrent, but first u need to truncate the table which is a cleaner, so the table will be there but the torrents will go away
 
2006-11-08 19:18:00
Group: Member
Posts: 158
Topics participated: 85
Topics started: 14
First post: 2006-02-25 16:30:00
Last post: 2008-09-25 15:43:00
i will explaint it again ;)

The torrents folder were deltete after that Crash and the database not...

i have added this to cleanup.php

mysql_query("DELETE FROM completed WHERE torrent=$arr[id]");



And now i have the dead entries in completete torrents in the Userdetails....

And no i need something like this here


DELETE FROM `completed` where torrents = not in the torrentfolder;



I can
 
2006-11-08 21:10:00
Group: Member
Posts: 2607
Topics participated: 1470
Topics started: 2
First post: 2006-07-10 10:45:00
Last post: 2008-06-13 17:08:00
go to your site and see the first added torrent and see the id

than do

SQL
DELETE FROM `completed` where torrents < 'THAT FIRST TORRENT ID THAT ADDED AFTER THE CRASH';
 
2006-11-08 21:22:00
Group: Member
Posts: 158
Topics participated: 85
Topics started: 14
First post: 2006-02-25 16:30:00
Last post: 2008-09-25 15:43:00
hmm okay i have thought of that too but another difficulty after the crash i have inserted a backup off the source


And now :)???^^
 
2006-11-08 21:29:00
Group: Member
Posts: 2607
Topics participated: 1470
Topics started: 2
First post: 2006-07-10 10:45:00
Last post: 2008-06-13 17:08:00
cleanup.php

just a min write, try it, as im not sure it will work, if this wont work change the '0' to ''

// delete crap cuz of error on completed
$res = mysql_query("SELECT seeders, leechers FROM torrents WHERE seeders < '0' AND leechers < '0''"); // less than 0, maybe try even '' with nothing
mysql_query("DELETE FROM completed WHERE torrent = $res");
 

Similar threads

Topic Posts Last post
Complete Noob Questions 5 2008-06-23 02:12:00
Complete anonymous uploading 151 2008-08-08 22:55:00
[Complete] Administrator Control Panel v1.1 16 2008-12-29 19:20:00
source code with complete mod passkey? 7 2006-05-25 07:37:00
Problem with torrents 5 2008-05-14 11:13:00