1) year(now()) returns an integer - there is no need to call int()
function on it.

2) the <cfoutput>... line in your code is totally useless and unnecessary.

3) is this code of yours in a cfm page or in a cfc function?

4) again, the simple
<cfloop from="2000" to="#year(now())#" index="yearCnt">
ALWAYS works.


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/


On 24/07/2009 23:23, N K wrote:
> This is the who;e code which I had to do in order for it work 
> 
> <cfset currYear= Year(now())> 
> <cfset currYear=int(currYear)>
> <cfoutput><cfset currYear=#currYear#></cfoutput>
> 
> <CFLOOP index="yearCnt" from='2000' to=#currYear#>
>  <!---Query ---->
> </CFLOOP>
> 
> And I do understand that every thing else listed on this post should work but 
> only the above worked and am using CF8.
> 
> NK 
> 
>> Try this:
>>
>> <CFLOOP index="yearCnt" from='2000' to='#currYear#'>
>>
>>
>> Right but something else is wrong.
>>
>> Azadi's example is about as simple as it gets. Something else in your code
>> is causing the problem. 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324941
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to