Using CFQUERYPARAM fixed the problem,
Query becomes:
<!--- filter the recordset --->
<cfquery name="FilteredBlogArticles" dbtype="query">
Select * from BlogArticles
where (articledate >= <cfqueryparam cfsqltype="cf_sql_date"
value="#CreateODBCDate(targetdate)#">)
order by articledate DESC
</cfquery>
-----Original Message-----
From: John Beynon [mailto:[EMAIL PROTECTED]]
Sent: 01 October 2002 15:29
To: CF-Talk
Subject: RE: QofQ and dates...
Still bitches....same error message - but the SQL at the bottom of the page
changes to:
SQL Select * from BlogArticles where articledate >= {d
'2002-09-24'} order by articledate DESC
What's with the ' stuff?
-----Original Message-----
From: Mike Townend [mailto:[EMAIL PROTECTED]]
Sent: 01 October 2002 15:25
To: CF-Talk
Subject: RE: QofQ and dates...
Try adding a createodcdate around it...
<cfset FilterDate = dateadd('d', arguments.AgeArticlesOnHomePage,
now())>
<cfquery name="FilteredBlogArticles" dbtype="query">
Select * from BlogArticles
where articledate >= #CreateODBCDate(FilterDate)#
order by articledate DESC
</cfquery>
HTH
-----Original Message-----
From: John Beynon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 1, 2002 15:19
To: CF-Talk
Subject: QofQ and dates...
should i be able to do date comparisons in a QofQ?
i'm using:
<cfset FilterDate = #dateadd('d', #arguments.AgeArticlesOnHomePage#,
now())#>
<!--- filter the recordset --->
<cfquery name="FilteredBlogArticles" dbtype="query">
Select * from BlogArticles
where articledate >= #FilterDate#
order by articledate DESC
</cfquery>
and getting:
Query Of Queries syntax error.
Encountered "articledate >= {" at line 3, column 31. Incorrect conditional
expression, Expected one of [like|null|between|in|comparison] condition,
returned. Also just noticed:
SQL Select * from BlogArticles where articledate >= {ts
'2002-09-24 15:12:35'} order by articledate DESC
Please try the following:
tucked away at the bottom of the page....
thanks for the help,
jb.
* [EMAIL PROTECTED] * +44 (0)1372 367147 * <http://www.era.co.uk/>
http://www.era.co.uk/
************************************************************************
*
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved.
The information supplied in this email should be treated in confidence. No
liability whatsoever is accepted for any loss or damage
suffered as a result of accessing this message or any attachments.
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists