Guest User

Untitled

a guest
Oct 26th, 2012
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cfloop query="MinorList">
  2.             <cfif minorlist.currentRow EQ 1 and minorlist.recordcount EQ 1>
  3.                 <cfset minornames= MinorList.first & " " & minorList.last>
  4.                 <cfset last_hold = TRIM(MinorList.last)>
  5.             <cfelseif minorlist.currentRow EQ 1>
  6.                 <cfset minornames= MinorList.first>
  7.                 <cfset last_hold = TRIM(MinorList.last)>
  8.             <cfelseif minorlist.currentRow LT MinorList.recordcount and last_hold EQ MinorList.last>
  9.                 <cfset minornames = minornames & ", " & MinorList.first>
  10.             <cfelseif minorlist.currentRow LT MinorList.recordcount and last_hold NEQ MinorList.last>
  11.                 <cfset minornames = minornames & " " & last_hold & ",">
  12.                 <cfset last_hold = TRIM(MinorList.last)>
  13.             <cfelseif minorlist.currentRow EQ MinorList.recordcount  and last_hold EQ MinorList.last>
  14.                 <cfset minornames = minornames & " and " & MinorList.first & " " & MinorList.Last>
  15.             <cfelseif minorlist.currentRow EQ MinorList.recordcount  and last_hold NEQ MinorList.last>
  16.                 <cfset minornames = minornames & " " & last_hold & " and " & MinorList.first & " " & MinorList.Last>
  17.             </cfif>
  18.         </cfloop>
Advertisement
Add Comment
Please, Sign In to add comment