Jump to content

Recommended Posts

I have a content management system and some articles can get out-dated.

I don't want to delete the articles but would like to archive them somehow so I can create a link to view archived articles.

I am looking for suggestions on how i would do this.  Would I need to update the database by creating an extra field which decides if it is current or archive and displays only the current articles.

Any suggestions would be great
Update the SQL query to make it time sensitive.

Consider the following:

[code]
SELECT *
  FROM `your_table`
  WHERE DATE(`publish_date`) > DATE_ADD(NOW(), INTERVAL -30 DAY)
[/code]

This will give you all articles published in the last month.  You can you use the inverse to get articles published in the last 30 days.

Best,

Patrick
  • 9 months later...

I have 2 solutions wich achieve the same objective. And please I am not an expert or anything

 

1. Yes u might have to alter ur DB and create a table that will contain all ur achieved articales

    and right a small program that will check the DB for old articles on regular intervals and send those

    which are old to the new table

 

2. The same as the first one difference is this time u don't alter your DB instead create a folder that will

    House all the old articles and create a field in one of ur tables that will link to those articles

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.