cftmfl wrote:
> <cfset playerShirt = 1>
>
> <cfloop condition = "playerShirt LTE 11">
> <cfquery name = "UpdateTeam" datasource = "#dsn#">
> Update Team
> set Shirt = #playerShirt#
> <cfset playerShirt = playerShirt + 1>
> </cfquery>
> </cfloop>
To expand on JR's answer. Since your query does not have a
where
clause, each time through the loop all records in the 'Team'
table have
their 'Shirt' field set to the current value of
'playerShirt'. I.E. You
update all the fields 11 times with the last update placing
'11' in all
the records.
This is a basic SQL concept that has nothing specific to do
with
ColdFusion other then ColdFusion is a very easy way to
interact with a
database using SQL.
Checking out some good introductory SQL resources such as
W3Schools
[
http://www.w3schools.com/sql/default.asp
or 'Teach Yourself SQL in 10
minutes' by Ben Forta [
http://www.forta.com/books/0672325675/
could be
very helpful.