Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfloop query="MinorList">
- <cfif minorlist.currentRow EQ 1 and minorlist.recordcount EQ 1>
- <cfset minornames= MinorList.first & " " & minorList.last>
- <cfset last_hold = TRIM(MinorList.last)>
- <cfelseif minorlist.currentRow EQ 1>
- <cfset minornames= MinorList.first>
- <cfset last_hold = TRIM(MinorList.last)>
- <cfelseif minorlist.currentRow LT MinorList.recordcount and last_hold EQ MinorList.last>
- <cfset minornames = minornames & ", " & MinorList.first>
- <cfelseif minorlist.currentRow LT MinorList.recordcount and last_hold NEQ MinorList.last>
- <cfset minornames = minornames & " " & last_hold & ",">
- <cfset last_hold = TRIM(MinorList.last)>
- <cfelseif minorlist.currentRow EQ MinorList.recordcount and last_hold EQ MinorList.last>
- <cfset minornames = minornames & " and " & MinorList.first & " " & MinorList.Last>
- <cfelseif minorlist.currentRow EQ MinorList.recordcount and last_hold NEQ MinorList.last>
- <cfset minornames = minornames & " " & last_hold & " and " & MinorList.first & " " & MinorList.Last>
- </cfif>
- </cfloop>
Advertisement
Add Comment
Please, Sign In to add comment