Just give it an enddate with a datetime data type. When you add the record,
make the endadate = #createODCDateTime(dateadd('d', 10, now()))# then:
select whatever from table where #createODBCDateTime(now())# < enddate
-or-
You could also just put a startdate and make its value
#createODBCDaetTime(now())# when you enter the record then:
Select whatever from table where startdate >
#createODBCDateTime(dateadd('d', -10, now()))#
..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-----Original Message-----
From: Ali [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 07, 2008 9:22 AM
To: CF-Talk
Subject: Expires after 10 days
Hi:
Sorry if it's a very basic question. I wonder how I can set a query record
to be displayed for a period of time? For example an advertisement stays
visible for 10 day in the site and inactivates automaticly afterward? I
thought maybe I use a "bit" entry in my database and somehow write a code in
CF that changes it from 1/YES to 0/No when 10 days later come but how I
really have no idea. Please help me.
Plus I wonder what is the name of such site/applications which show such
advertisement? Are they Auction sites or they have another name?
Thanks
Ali
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298442
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4