Thanks for responding Nick.

    The dates simply come from a database query, actually a query of a
stored procedure.  There is a simple recordset of dates.  There may be 4 or
5 years.  It would be best if the query to array could happen just using
the one query.  But, if I can't figure out how to do this that way, I would
be happy to have the 4 or 5 queries.  But, I don't know what the code would
be to inject a <cfif statement in the query that would get, say, only the
dates that are in 2014.  Can you help me figure this out?

Thanks much,
Lewis




On Tue, May 28, 2013 at 2:53 PM, Eric Nicholas Sweeney <
[email protected]> wrote:

>
> Lewis...
>
> How many years of data do you have?
>
> A few things come to mind..  You could have separate queries for each
> year... (clumsy but effective) Or tie a cfDiv to your query - based on year
> passed to the div...
>
> The page...
> <cfform>
>     <cfinput type="text" name="MyYear" value="#FORM. MyYear#" />
> </cfform>
>
> <h3>Results </h3>
> <cfdiv bind="url:MyResultsTable.cfm? MyYear ={MyYear}" bindonload="true" />
>
>
> ---
> The Query... OnMy ResultsTable.cfm...
>
> SELECT Data
> FROM Table
> WHERE Year = <cfqueryparam value="#URL.MyYear#">
>
> This isn't final code - but it should help...  Additionally - you could
> have the cfinput be a select - with Year drop down... looping from "this
> year" to earliest  year...
>
> - Nick
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:6079
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to