Current time: 10-27-2012, 01:54 AM    Register | Lost Password?

Contest #1- First member to have 5 referals will get VIP status. You can find your referal link in your UserCP


Post Reply 
Clean blank downloads (Automatically)
Author Message
immu Offline
Newbie


Posts: 5
Joined: Feb 2011
Post: #1
Clean blank downloads (Automatically)
Here's a small code for WCDDL that cleans out the blank downloads from the database.

If you're using WCDDL v1.45 then just make a new file in the "modules' directory and call it "wcddl_CleanDownloadsMOD.php".


<?php
/*BEGIN_INFO
This will clean out all of the blank downloads.
END_INFO*/

mysql_query("DELETE FROM wcddl_downloads WHERE title='' OR url='' OR sid=''");
mysql_query("DELETE FROM wcddl_queue WHERE title='' OR url='' OR sid=''");
?>



If you're not then add this to the bottom of "funcs.php" but before the "?>":
mysql_query("DELETE FROM wcddl_downloads WHERE title='' OR url='' OR sid=''");
mysql_query("DELETE FROM wcddl_queue WHERE title='' OR url='' OR sid=''");
02-03-2011 12:31 PM
Find all posts by this user Quote this message in a reply
jomasaco Offline
Respected Member


Posts: 17
Joined: May 2010
Post: #2
Clean blank downloads (Automatically)
Is better add this in admin maintenance, in Optimize & Repair Tables
this way
in funcs find
Quote:if(isset($ort)) {
mysql_query("OPTIMIZE TABLE wcddl_downloads, wcddl_queue, wcddl_recents, wcddl_sites, wcddl_blacklist, wcddl_whitelist");
mysql_query("REPAIR TABLE wcddl_downloads, wcddl_queue, wcddl_recents, wcddl_sites, wcddl_blacklist, wcddl_whitelist");
echo '<div align="center" style="color:green;">Tables Optimized & Repaired</div>';
}

Replace by:
if(isset($ort)) {
        $alltables = mysql_query("SHOW TABLES");
while ($table = mysql_fetch_assoc($alltables))
{
   foreach ($table as $db => $tablename)
   {
       mysql_query("OPTIMIZE TABLE '".$tablename."'")
           or die(mysql_error());
           echo $tablename." Opmizide<br />";
   }
      foreach ($table as $db => $tablename)
   {
       mysql_query("REPAIR TABLE '".$tablename."'")
           or die(mysql_error());
           echo $tablename." Repaired<br />";
   }
  
}
    mysql_query("DELETE FROM wcddl_downloads WHERE title ='' or url='' or type='' or dat ='' ");
mysql_query("DELETE FROM wcddl_queue WHERE title='' OR url='' OR sid=''");
    echo '<div align="center" style="color:green;">Tables Optimized & Repaired</div>';
    }
02-05-2011 12:24 PM
Find all posts by this user Quote this message in a reply
c0rrupt Offline
Administrator


Posts: 262
Joined: Mar 2010
Post: #3
Clean blank downloads (Automatically)
great piece of code guys... ++rep
Smile
02-05-2011 06:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Show the downloads for a specific site (WCDDL v2) c0rrupt 0 107 07-26-2012 04:35 PM
Last Post: c0rrupt
  Show site Downloads/Rank [module] c0rrupt 9 604 12-25-2011 01:41 AM
Last Post: WJManiaC
  Amount of Downloads in Graph c0rrupt 9 396 11-15-2010 01:34 PM
Last Post: nYXem
  Show Top 10 Downloads by Views [module] c0rrupt 0 129 11-07-2010 02:19 PM
Last Post: c0rrupt
  Full Speed Downloads c0rrupt 0 137 11-07-2010 02:12 PM
Last Post: c0rrupt
  Strip all the slashes from downloads c0rrupt 0 96 11-07-2010 06:26 AM
Last Post: c0rrupt
  Accept All Downloads By Site c0rrupt 1 268 05-28-2010 07:41 AM
Last Post: nirav5300



User(s) browsing this thread: 2 Guest(s)

Affiliates
PhazeDDL WarezUNION WarezOrder Free Full Downloads Free Full Downloads SuppaDDL Free Full Downloads CafeDDL-Serves Premium Downloads! Free Full Rapidshare Fileserve Netload RapidGator Extabit Warez Downloads
This forum uses Lukasz Tkacz MyBB addons.