Hi,

This seems like it should be pretty straightforward but I'm new to
ColdFusion and
cannot get this at all.

I want to update a column in a database with an incremented variable in a
loop. I
want to be able to do this for a date column eventually (increment to next
day) but
I cannot get even this basic query below to work.

The query is :

<cfset playerShirt = 1>

<cfloop condition = "playerShirt LTE 10">
        <cfquery name = "UpdateTeam" datasource = "#dsn#">
                Update Team
                set Shirt =  #playerShirt#
                <cfset playerShirt = playerShirt + 1>
        </cfquery>
</cfloop>

What I want this to do is loop through the Team table starting at row 1
and update
the players shirt number from 1 to 10.

At the moment all shirt numbers are set to 10.

Any guidance on this would be greatly appreciated.

thanks in advance

aor


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3502
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to