Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combination problem...

Status
Not open for further replies.

Leakyradiator

Technical User
Jul 12, 2002
35
US
Hi:

I have an online magazine. As each article is inserted into the database, an issue date is assigned. When the month changes, the new months articles are automatically presented.

Here's my problem. I have three possible status conditions for each article: the current issue, articles that I am adding for the future issue, and articles from past issues which are archived.

Now, as each month lapses, I manually change the status of the previous month's issue to "archive."

How can I automate this process so that only the current month's articles are visible in the current issue (and not the future articles), and the previous month's articles are then moved to archive status?

Another issue is that I want to add a Verity search engine to the archives page. (again, all articles are in a database). How do I get the search engine to only index the archived articles? (It can include the current issue articles, but not the future issue articles that may be present in the database).

Thanks in advance for all help.


 
I think you're barking up the right tree. I might actually take it one step further and set up a column to hold the volume/issue that the article was in or is intended to be in.

Then, when you're ready to publish, you simply hit a webpage in your browser that runs a CFQUERY that says:
Code:
UPDATE myTable SET status='published' WHERE issue='#currentIssue#' AND status='pending'
or something like that.


Verity is a whole 'nother animal. I've never tried to do exactly what you're trying to do... but I believe you just use CFINDEX with a query parameter set to a query that SELECTs only those rows you want an your Verity collection (like
Code:
SELECT ... WHERE status='pending' OR status='archived'
)

-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top