I ran into this exact same problem just yesterday. I fixed by changing
the getMaxTypeDate and getMinTypeDate just above those problem lines of
code:
<cffunction name="getMinTypeDate">
<cfargument name="typename">
<cfset var q = "">
<cfset var minDate = Now()>
<cfquery name="q" datasource="#application.dsn#">
SELECT min(datetimelastupdated) as mindate
FROM #application.dbowner##arguments.typename#
</cfquery>
<cfset minDate = DateAdd("d",-7,q.minDate)>
<cfreturn minDate>
</cffunction>
<cffunction name="getMaxTypeDate">
<cfargument name="typename">
<cfset var q = "">
<cfset var maxDate = Now()>
<cfquery name="q" datasource="#application.dsn#">
SELECT max(datetimelastupdated) as maxdate
FROM #application.dbowner##arguments.typename#
</cfquery>
<cfset maxDate = DateAdd("d",1,q.maxDate)>
<cfreturn maxDate>
</cffunction>
<cfparam name="output.startyear"
default="#year(getMinTypeDate(output.dmtype))#">
<cfparam name="output.endyear"
default="#year(getMaxTypeDate(output.dmtype))#">
<cfparam name="output.maxday"
default="#day(getMaxTypeDate(output.dmtype))#">
<cfparam name="output.maxmonth"
default="#month(getMaxTypeDate(output.dmtype))#">
<cfparam name="output.maxyear"
default="#year(getMaxTypeDate(output.dmtype))#">
<cfparam name="output.minday"
default="#day(getMinTypeDate(output.dmtype))#">
<cfparam name="output.minmonth"
default="#month(getMinTypeDate(output.dmtype))#">
<cfparam name="output.minyear"
default="#year(getMinTypeDate(output.dmtype))#">
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Jiib75
>Sent: Wednesday, June 09, 2004 5:08 AM
>To: FarCry Developers
>Subject: [farcry-dev] Bug with HandPicked Rule
>
>Hello,
>
>I'd like to report a bug with 'HandPicked Rule' in selectObjects.cfm
>
>There's a problem with these lines :
>
> <cfparam name="output.minday"
>default="#day(getMinTypeDate(output.dmtype)-7)#">
> <cfparam name="output.minmonth"
>default="#month(getMinTypeDate(output.dmtype))#">
>
>
>For an object, if the getMinTypeDate function returns a date
>at the beginning of a month (ex 6-6-2004), then output.minday
>value will be 31, but output.minmonth value stays at 6, so the
>SQL query will not be correct. (and it can return an error,
>because 31-6-2004 is not a valid date)
>
>
>Jiib.
>
>
>
>---
>You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
>To unsubscribe send a blank email to
>[EMAIL PROTECTED]
>Aussie Macromedia Developers: http://lists.daemon.com.au/
>
>
---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/