-
1. Re: Using CFScript statements
p.sim Jun 18, 2012 4:20 PM (in response to Community Help)The code example loops through a query that uses do-while() is a poor example. It should utilize while(). We want to check first if there is a result set. If there is, then read the record. Using while() would eliminate the use of if() statement prior do-while(). do-while() means we want to run the first loop, then check a condition whether or not to run the subsequent loop. while() means we want to check if the first and subsequent loop is true.
-
2. Re: Using CFScript statements
CF-AXL Jun 21, 2012 1:16 AM (in response to Community Help)For the last code, an opening angle bracket (<) is missing in the opening cfscript tag.
-
3. Re: Using CFScript statements
Charlie Arehart Oct 6, 2012 7:54 PM (in response to p.sim)More than that, the example (showing a do-while to loop over a query) can be removed as of CF10 with its new support for for-in looping over a query (shown near the bottom of this page). As there are other examples of do-while loops offered above it, there's really no need even to replace it with something else.



