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

Content expiration from web page

Explorer ,
Mar 18, 2007 Mar 18, 2007

Copy link to clipboard

Copied

Hi, all - Dreamweaver 8.0.2, Win XP, using asp, vbscript, and SQL database (and utilizing WebAssist's Super Suite).

I'm going to be developing a "clients only" area with asp pages connecting to a SQL database. As part of the project, I need to develop an administration area where our technical writing staff can add documents to the site (via an upload/web form) with a field on the form that lets them enter the date they want the content to expire. 'Expire' meaning the link to a particular file (this could be old release notes, product bulletins, etc.).no longer show up on the web page to the client once a given date is reached.

I'm only assuming that you would enter the expiration date in a column in the database table and then run a query that compares the column date to today's date and if the comparison yields some value, then the link is either displayed or it's not. Would that be fair logic?

I'm really not sure how to approach this - is this something that can be written in asp code or would this be more of a server function? If anyone has ever done this, I would be very grateful for any suggestions or 'best methods' in which to achieve this.

Thank you.

John
TOPICS
Server side applications

Views

299
Translate

Report

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
LEGEND ,
Mar 18, 2007 Mar 18, 2007

Copy link to clipboard

Copied

On 18 Mar 2007 in macromedia.dreamweaver.appdev, BurritoVictim wrote:

> I'm only assuming that you would enter the expiration date in a
> column in the database table and then run a query that compares the
> column date to today's date and if the comparison yields some value,
> then the link is either displayed or it's not. Would that be fair
> logic?

That would be fair logic.

> I'm really not sure how to approach this - is this something that
> can be written in asp code or would this be more of a server
> function ?

You'd write it in the SQL for the query:

SELECT field1, field2 FROM myTable WHERE expirationDate > GETDATE()

The GETDATE() function assumes that you're using Microsoft SQL Server;
you specified only "SQL", and that's the query language that almost all
databases use.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php

Votes

Translate

Report

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
Explorer ,
Mar 18, 2007 Mar 18, 2007

Copy link to clipboard

Copied

LATEST
Joe, thanks for your quick reply - yes, you are correct SQL meaning Microsoft SQL Server (thanks for the note, I'll be sure to be more specific next time).

Okay, this makes sense to me - for the web forms we currently use for our web visitors to register for webinars, request information, etc. I always include a column in the table named "dateSubmitted" that uses the (getdate()) function while saving to the database.

I'll give it a whirl - thank you, Joe!!

John

Votes

Translate

Report

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