Quantcast
Viewing all articles
Browse latest Browse all 21760

Re: Is using current date and dateAdd the best way to show 30 days worth of records .

Alternatively, use CFQueryParam and get rid of the DateFormat() calls:

 

<cfquery name="getdevotional" datasource="#application.database#">

SELECT display_date, title

FROM mobile

where display_date BETWEEN <cfqueryparam value ="#mydatetime#" cfsqltype="cf_sql_date"> AND <cfqueryparam value="#DateAdd('d', 30, mydatetime)#" cfsqltype="cf_sql_date">

</cfquery>

 

-Carl V.


Viewing all articles
Browse latest Browse all 21760

Trending Articles