<!--- Check for IDs. ---> <cfif qID.RecordCount> ORDER BY ( CASE <cfloop index="intRow" from="#REQUEST.Pager.GetStart()#" to="#REQUEST.Pager.GetEnd()#" step="1"> WHEN b.id = <cfqueryparam value="#qID[ 'id' ][ intRow ]#" cfsqltype="CF_SQL_INTEGER" /> THEN <cfqueryparam value="#intRow#" cfsqltype="CF_SQL_INTEGER" /> </cfloop> ELSE 0 END ) ASC </cfif>