Results 1 to 10 of 12
-
9th Oct 2011, 05:32 AM #1OPMemberWebsite's:
downfreak.comDLE Huge database deleting outdated post problem
Hi,
I am using DLe on my website and the sql database is now 6GB with more than 1 million posts.
I am having a problem when trying to delete outdated posts or when trying to delete about 100 posts at once the server keep sending "INTERNAL ERROR" message.. and i cant do anything..
I can only delete posts if i want to do 1 by 1 which will take me for ever to do.
Anyone know any alternative for it?
What i was thinking is if any script than exist than i can run and it will delete 1 post per 30 seconds starting from the oldest one? there i can get about (30* 2 * 60) = 3600 posts deleted per hour
cheersdownfreak Reviewed by downfreak on . DLE Huge database deleting outdated post problem Hi, I am using DLe on my website and the sql database is now 6GB with more than 1 million posts. I am having a problem when trying to delete outdated posts or when trying to delete about 100 posts at once the server keep sending "INTERNAL ERROR" message.. and i cant do anything.. I can only delete posts if i want to do 1 by 1 which will take me for ever to do. Anyone know any alternative for it? What i was thinking is if any script than exist than i can run and it will delete 1 Rating: 5
-
9th Oct 2011, 05:38 AM #2MemberWebsite's:
vaporhostn.coma script will have the same issue.. this has to do with your mysql database...
Best thing to do is find out how dle deletes the tables from mysql... if its all coming from just one table then go into phpmyadmin and change it so it shows the oldest table and delete tables from there...
-
9th Oct 2011, 08:32 AM #3OPMemberWebsite's:
downfreak.comIf the scrip can execute itself every 30 seconds to delete only 1 at a time will not be a problem as it allow me to delete 1 - 2 posts but when i try to delete more than 5, i just keep on getting the internal error message..
Also am not a php expert so a bit hard for me to find out where all the tables..
i know it should be in editnews.php but dont know the rest lol
-
9th Oct 2011, 08:37 AM #4Respected MemberWebsite's:
DL4Everything.com Soft2050.inYou wanted to delete the news by last posted news or first posted news first?
just coded a quick script to do the task:
PHP Code:<?php
/**
* Developer: Soft2050
* IDE Used: JetBrains PhpStorm.
* Date: 10/9/11
* Time: 2:07 PM
*/
$dbhost = ''; // Enter your db host here
$dbuser = ''; // Enter db username here
$dbpass = ''; // Enter db password here'
$dbname = ''; // Enter your db name here
$connection = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysqli_error());
mysql_select_db($dbname, $connection);
mysql_query("DELETE FROM `dle_post` LIMIT 1");
mysql_close($connection);
?>
Execute this in ssh:
Code:1 * * * * /filepathhere.php
Hope it helps
-
9th Oct 2011, 10:07 AM #5OPMemberWebsite's:
downfreak.comhey soft2050, how you been mate?
haven't seen you for ages?
by the way from the code that u just coded, is it going to delete the post which was first posted in terms of time when it was posted?
also it it going to delete infos attributed to the post like number of viewings and comments?
cheers mate
-
9th Oct 2011, 10:10 AM #6Respected MemberWebsite's:
DL4Everything.com Soft2050.in
-
9th Oct 2011, 10:22 AM #7Respected DeveloperWebsite's:
wrzc.orgPHP Code:mysql_query("DELETE FROM `dle_post` LIMIT 1");
You should really order them as well by time. Yes it should remove older posts first but you want to make sure. I don't use DLE so don't know the name of the time column but you'll need something like this
PHP Code:mysql_query("DELETE FROM `dle_post` ORDER BY time ASC LIMIT 5");
PHP Code:mysql_query("DELETE FROM `dle_post` WHERE views < 20 ORDER BY time ASC LIMIT 5");
Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic
Huge list of Warez Sites and free Multiposter Templates
-
12th Oct 2011, 11:35 AM #8OPMemberWebsite's:
downfreak.comi tried to run
<?php
/**
* Developer: Soft2050
* IDE Used: JetBrains PhpStorm.
* Date: 10/9/11
* Time: 2:07 PM
*/
$dbhost = ''; // Enter your db host here
$dbuser = ''; // Enter db username here
$dbpass = ''; // Enter db password here'
$dbname = ''; // Enter your db name here
$connection = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysqli_error());
mysql_select_db($dbname, $connection);
mysql_query("DELETE FROM `dle_post` LIMIT 1");
mysql_close($connection);
?>
-
22nd Oct 2011, 11:55 PM #9OPMemberWebsite's:
downfreak.comAny "Respected Developer" was to work on this?
cheers
-
23rd Oct 2011, 12:08 AM #10Member
just run a query in phpmyadmin
delete all posts below ID 1000, adjust the number to suit you
PHP Code:DELETE FROM `dle_post` WHERE id < 1000
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Deleting fields from database tables with phpMyAdmin
By Areon in forum Server ManagementReplies: 0Last Post: 17th Mar 2014, 05:16 PM -
Backup/Repair Huge Database's VPS/DED
By Gavo in forum Technical and Security TutorialsReplies: 11Last Post: 11th Mar 2011, 02:40 PM -
[Selling] MegaSoftz.com PR1(Huge DataBase)
By play_avi in forum Completed TransactionsReplies: 0Last Post: 4th Jul 2010, 08:26 AM -
WTB: Huge Warez vbulletin database
By jackjack in forum Completed TransactionsReplies: 21Last Post: 12th Nov 2008, 03:32 PM -
[WTS] Huge Lyrics Database 5$
By Harshadewa in forum Completed TransactionsReplies: 2Last Post: 8th Oct 2008, 01:47 AM
themaCreator - create posts from...
Version 3.47 released. Open older version (or...