almost able to mass delete expired articles! SOLVED

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
rescamilla
Posts: 69
Joined: Sun 25. Jul 2004, 01:53

almost able to mass delete expired articles! SOLVED

Post by rescamilla »

I am not a my mysql expert, so can somebody help me complete this myphpadmin query?

Code: Select all

SELECT *
FROM `phpwcms_article`
WHERE `article_cid` =316
AND `article_end` < '2011-02-24 23:59:59'
The above query shows me all the articles in the 316 category that have an end date less than 02/24/11. I want to be able to add to this query and change the "article_deleted" value from "0" to "9". This will then remove the hundreds of articles in that category that are expired (from view in the backend).

This is a very large site, and my expired articles are out of control. Clicking the little red x in the backend to delete every article would take forever.

-Ray

PS I am using phpwcms v 1.3.3
Last edited by rescamilla on Sat 26. Feb 2011, 06:27, edited 1 time in total.
rescamilla
Posts: 69
Joined: Sun 25. Jul 2004, 01:53

Re: almost able to mass delete expired articles!

Post by rescamilla »

I figured it out. Run this query in phpmyadmin to delete expired articles:

Code: Select all

UPDATE phpwcms_article SET article_deleted = '9' WHERE `article_cid` = '316' AND `article_end` < '2011-02-24 23:59:59';
Note: You need to replace 316 with the catergory id # that you want to delete from (I only wanted to delete expired articles from my news category). Also modify the date to suit your needs.

-Ray
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: almost able to mass delete expired articles! SOLVED

Post by update »

If you've set the articles "visible after expire" google will not be happy at all, I think... :?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Post Reply