WHERE
NewsBySection.sectionID = '13' <!--- is this a char/varchar? --->
AND News.startDate = <cfqueryparam value="#daterequestAdd#"
cfsqltype="cf_sql_date" />
AND News.endDate >= <cfqueryparam value="#daterequestAdd#"
cfsqltype="cf_sql_date" />
AND News.archive = 0
* depending on your datatype, that cfsqltype might need to be changed to
cf_sql_timestamp
On Thu, Jul 31, 2008 at 12:02 PM, Robert Newhart
<[EMAIL PROTECTED]>wrote:
> I am trying to lock down the queries on the site I am working on with
> cfqueryparam and while the basics are pretty straight forward, I am not
> quite sure how to handle a query like this.
>
> SELECT TOP 3 News.newsTitle, News.newsBriefDesc, News.newsID,
> NewsBySection.precedence, News.startDate, News.endDate, News.newsFullBody
> FROM News
> LEFT OUTER JOIN NewsBySection ON News.newsID =
> NewsBySection.newsID
> WHERE ((NewsBySection.sectionID = '13')
> AND (News.startDate <= '#daterequestAdd#') AND (News.archive = 0)) AND
> ((News.endDate >= '#daterequestAdd#') AND (NewsBySection.sectionID = '13')
> AND (News.archive = 0) )
> ORDER BY NewsBySection.precedence
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310020
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4