Current time: 12-26-2012, 05:44 PM    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: 272
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
WarezM Offline
Respected Member


Posts: 19
Joined: Nov 2012
Post: #4
RE: Clean blank downloads (Automatically)
I tried all sorts of things and it just wont go past the error no matter what i add to it , anyone help me out ?


You Have An Error In Your SQL Syntax; Check The Manual That Corresponds To Your MySQL Server Version For The Right Syntax To Use Near ''Useronline'' At Line 1

This portion of the code works
" DELETE FROM wcddl_downloads WHERE title ='' "

Thanks
12-11-2012 02:24 AM
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 134 07-26-2012 04:35 PM
Last Post: c0rrupt
  Show site Downloads/Rank [module] c0rrupt 9 666 12-25-2011 01:41 AM
Last Post: WJManiaC
  Amount of Downloads in Graph c0rrupt 9 460 11-15-2010 01:34 PM
Last Post: nYXem
  Show Top 10 Downloads by Views [module] c0rrupt 0 147 11-07-2010 02:19 PM
Last Post: c0rrupt
  Full Speed Downloads c0rrupt 0 174 11-07-2010 02:12 PM
Last Post: c0rrupt
  Strip all the slashes from downloads c0rrupt 0 115 11-07-2010 06:26 AM
Last Post: c0rrupt
  Accept All Downloads By Site c0rrupt 1 302 05-28-2010 07:41 AM
Last Post: nirav5300



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

Affiliates
PhazeDDL WarezUNION WarezOrder Free Full Downloads Free Full Downloads SuppaDDL CafeDDL-Serves Premium Downloads! free porn downloads @ PornDDL.me
This forum uses Lukasz Tkacz MyBB addons.