Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Creating timed release of content with my database...how to do it?

Guest
Jun 28, 2010 Jun 28, 2010

Hello All,

With the gracious help and support of many of you here on this forum, I have learned and gained competency in building and working with databases. I couldn't have done it without this forum and its participants. Thank you!

Now, here's the next phase: I want to time-release content on my website based on release dates that I specify.

For example, I add new file names and all related information to my database, and I then wish to give a file, or group of files a specific date that I would like them to appear on the website. I haven't done much reading on timestamps but I am suspecting they will be relevant to my new challenge. Ideally, I'd like to be able to release new content on every Friday, or on particular dates of the month, 7th, 14th, etc.

Furthermore, I would like to also specify a date when the content is no longer available on the website, a task that I assume will involve timestamps, etc.

I'm not asking for a letter-by-letter solution, rather I would like to know where to look to gain this information.

Many thanks in advance for your help!!!

Sincerely,

wordman

TOPICS
Server side applications
384
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 30, 2010 Jun 30, 2010

If you store the file's valid dates (beginning and ending) in the database along with the (link to the) file contents, then a query based on today's date could select only those files with a date after the start date and before the end date?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 30, 2010 Jun 30, 2010

BCD,

Interesting approach, and very do-able. Ideally, I would like to automate it a bit more which is why I was thinking it could be done with timestamps.

Could I have a column in the main table containing a timestamp (or the start date) for each entry, then write a query comparing the current date to the timestamp and discarding the record if the current date is older than the timestamp by 90 days?

I like your approach though, it's simple and clean.

Many thanks!

Sincerely,

wordman

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 30, 2010 Jun 30, 2010

Exactly so, Wordman! Each record would contain the earliest and the latest

dates that that record would be valid for. Use the current time as the

timestamp whenever the records are accessed to filter out those you want to

display. I think you are trying to make it a little more complicated than it

really is. Good luck.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 30, 2010 Jun 30, 2010
LATEST

BCD,

You know me well already. I tend to overthing things, this is true. HOWEVER, having logic figure these things out based on start date/timestamp values saves me time on the back end updating the database with hard numbers. Instead of me adding start and end dates, it seemed simpler to use the timestamp as a way to figure this out instead. However, I suppose I could just figure out the schedule times on my own and add those to the table.

Like your style. Many thanks!

Cheers,

wordman

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines