Wondering if anyone might be able to help with this.
I have products in the db that have offerStart and offerEnd dates and according
to today's date they are on offer today or not, so the following works great
when individually looking at the products and CF does the work:
<cfset today = "#DateFormat(Now(),'yyyy-mm-dd')#">
<cfif dateDiff("d", offerStart, today) GTE 0 AND dateDiff("d", today, offerEnd)
GTE 0>
<cfset OnOffer = "True">
<cfelse>
<cfset OnOffer = "False">
</cfif>
but now I need to output ALL products in one huge list(well I'll break them
down into pages) and show which one is on offer so I thought SQL should do the
work. How could I 'translate' the above CF into SQL?
Any help would be greatly appreciated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349820
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm