|
|
(#1)
|
|
|||
|
Clean blank downloads (Automatically) -
02-03-2011, 04:31 PM
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". Code:
<?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 "?>": Code:
mysql_query("DELETE FROM wcddl_downloads WHERE title='' OR url='' OR sid=''");
mysql_query("DELETE FROM wcddl_queue WHERE title='' OR url='' OR sid=''");
|
|
(#2)
|
|
|||
|
02-05-2011, 04:24 PM
Is better add this in admin maintenance, in Optimize & Repair Tables
this way in funcs find Quote:
Code:
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>';
}
|
|
(#3)
|
| Bookmarks |
|
| Tags |
| automatically, blank, clean, downloads |
| Thread Tools | |
| Display Modes | |
|
|