Remove Old Articles- Articles older than (date)

Managing your articles within Article Dashboard

Remove Old Articles- Articles older than (date)

Postby GardenSimply » Sun Oct 19, 2008 4:55 am

Question:
Can someone tell me if there is a way to remove old articles. If so, how?


Solution by BJC Computer Services http://www.bjc-computer-services.com

Here is the SQL command to delete articles by date. Change 'tbl_name' to the name of your actual articles table, and change the date to whatever you need. This command will delete everything posted previous to that date.

Code: Select all
DELETE FROM tbl_name WHERE `posteddate` < '2007-05-01'


Just go to phpMyAdmin, Select your database, then Select your table name, then Select the SQL button at the top of the screen, and paste in the command with the changes you made and select GO.

I suggest that you start with the single oldest date to make sure it works as you expect, then expand the date after verifying the results you need.

As always, backing up your table ahead of time is a good idea in case of problems. Then you can always restore the backup if necessary.
User avatar
GardenSimply
Admin
 
Posts: 208
Joined: Sat Sep 15, 2007 10:31 am
Location: Oklahoma

Re: Remove Old Articles- Articles older than (date)

Postby joebrochin » Sun Nov 09, 2008 2:08 pm

Worked like a charm
joebrochin
Active Member
 
Posts: 121
Joined: Mon Sep 17, 2007 7:16 pm
Location: Jacksonville, NC


Return to Article Management in AD

Who is online

Users browsing this forum: No registered users and 1 guest

cron