Gossamer Forum
Home : Products : DBMan : Customization :

New records in past X days via SSI?

Quote Reply
New records in past X days via SSI?
(ignore the previous message- I figured it out).

OK, so now I have both "whats_new_days=x" and "whats_new_records=x" working via ssi.

Now, here's the tricky part.

I'm using this to manage a "news" db, but I've no idea how often it will be updated. (I won't be updating it).

I want the news/index.shtml page to include either:

a. all the postings added in the last X days

or

b. the last X postings.

In other words, I want it to try first for "show all the postings added (or modified, more accurately) in the last 14 days," but, if that returns nothing (no records found), then, "show the last 5 postings, regardless of when they were last edited"

Any ideas?

I'm thinking this might be accomplished through a seperate, extra script, which calls the first, sees if it returns a good status, and then calls the second case.

Or, a new section in sub query, called perhaps whats_new_conditional, which first checks whats_new_days, and then if that returns nothing, checks whats_new_records. It could take as input two numbers = days,records , where days=number of days for whats_new_days, and
records=number of records for whats_new_records in case the first returns 0.

Time to go eat lunch.

John



[This message has been edited by John Eckman (edited July 16, 1999).]
Quote Reply
Re: New records in past X days via SSI? In reply to
Hi

I have done a DBMan mod which includes putting the last x number of articles in database on a page via SSI: http://www.gossamer-threads.com/...es/Detailed/443.html

I have not worked out how to get all stuff from the last x number of days - somewhere in one of the DBMan forums here there is a posting from me on how to get SSI to produce todays date in DBMan format, but all I could get working was articles from the x last number of days, but any thing submitted on the current day would not display! There probably is a way to do this but I decided that since I didn't know how often news would be posted it was best to have the last x number of articles (using the ID field - there is a problem with modified articles).

Chris

[This message has been edited by Chris Croome (edited July 17, 1999).]