anchor.diff:  		WHERE ( u.isActive = <cfqueryparam value="1" cfsqltype="cf_sql_bit" />
   		AND u.role = <cfqueryparam value="speaker" cfsqltype="cf_sql_varchar" /> )
   		AND (  
  +		<!--- first name loop --->
   		<cfloop from="1" to="#ListLen(ARGUMENTS.searchTerm,' ')#" index="iX">
   			s.firstName LIKE <cfqueryparam value="%#APPLICATION.dataEnc(ListGetAt(ARGUMENTS.searchTerm,iX,' '))#%" cfsqltype="cf_sql_varchar" />
   			<cfif NOT iX EQ ListLen(ARGUMENTS.searchTerm,' ')> OR </cfif>
   		</cfloop>
   		)
   		OR (
  +		<!--- last name loop --->
   		<cfloop from="1" to="#ListLen(ARGUMENTS.searchTerm,' ')#" index="iX">
   			s.lastName LIKE <cfqueryparam value="%#APPLICATION.dataEnc(ListGetAt(ARGUMENTS.searchTerm,iX,' '))#%" cfsqltype="cf_sql_varchar" />
   			<cfif NOT iX EQ ListLen(ARGUMENTS.searchTerm,' ')> OR </cfif>
   		</cfloop>
   		)
   		OR ( 
  +		<!--- twitter handle loop --->
   		<cfloop from="1" to="#ListLen(ARGUMENTS.searchTerm,' ')#" index="iX">
   			s.twitter LIKE <cfqueryparam value="%#APPLICATION.dataEnc(ListGetAt(ARGUMENTS.searchTerm,iX,' '))#%" cfsqltype="cf_sql_varchar" />
   			<cfif NOT iX EQ ListLen(ARGUMENTS.searchTerm,' ')> OR </cfif>
   		</cfloop>
   		)
   		OR ( 
  +		<!--- specialties loop --->
   		<cfloop from="1" to="#ListLen(ARGUMENTS.searchTerm,' ')#" index="iX">
   			s.specialties LIKE <cfqueryparam value="%#ListGetAt(ARGUMENTS.searchTerm,iX,' ')#%" cfsqltype="cf_sql_varchar" />
   			<cfif NOT iX EQ ListLen(ARGUMENTS.searchTerm,' ')> OR </cfif>
   		</cfloop>
   		)
   		OR ( 
  +		<!--- locations loop --->
   		<cfloop from="1" to="#ListLen(ARGUMENTS.searchTerm,' ')#" index="iX">
   			s.locations LIKE <cfqueryparam value="%#ListGetAt(ARGUMENTS.searchTerm,iX,' ')#%" cfsqltype="cf_sql_varchar" />
   			<cfif NOT iX EQ ListLen(ARGUMENTS.searchTerm,' ')> OR </cfif>
  
positive.code: 
    <cfquery name="qGetSpeakers" datasource="#variables.instance.datasource.getDSN()#" username="#variables.instance.datasource.getUsername()#" password="#variables.instance.datasource.getPassword()#">
  		SELECT speakerKey, userId, firstName, lastName, email, phone, showPhone, twitter, showTwitter, specialties, locations, isACP, isAEL, isUGM, isOther
  		FROM speakers
  		WHERE 1 = 1
    <cfif NOT structIsEmpty(ARGUMENTS.filter)>
      <!--- filter is applied --->
      <cfif structKeyExists(ARGUMENTS.filter, 'userId')>
  		AND userId = <cfqueryparam value="#ARGUMENTS.filter.userId#" cfsqltype="cf_sql_integer" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'firstName')>
  		AND firstName = <cfqueryparam value="#ARGUMENTS.filter.firstName#" cfsqltype="cf_sql_varchar" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'lastName')>
  		AND lastName = <cfqueryparam value="#ARGUMENTS.filter.lastName#" cfsqltype="cf_sql_varchar" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'email')>
  		AND email = <cfqueryparam value="#ARGUMENTS.filter.email#" cfsqltype="cf_sql_varchar" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'phone')>
  		AND phone = <cfqueryparam value="#ARGUMENTS.filter.phone#" cfsqltype="cf_sql_varchar" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'twitter')>
  		AND twitter = <cfqueryparam value="#ARGUMENTS.filter.twitter#" cfsqltype="cf_sql_varchar" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'specialties')>
  		AND specialties = <cfqueryparam value="#ARGUMENTS.filter.specialties#" cfsqltype="cf_sql_varchar" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'locations')>
  		AND locations = <cfqueryparam value="#ARGUMENTS.filter.locations#" cfsqltype="cf_sql_varchar" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'isACP')>
  		AND isACP = <cfqueryparam value="#ARGUMENTS.filter.isACP#" cfsqltype="cf_sql_bit" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'isAEL')>
  		AND isAEL = <cfqueryparam value="#ARGUMENTS.filter.isAEL#" cfsqltype="cf_sql_bit" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'isUGM')>
  		AND isUGM = <cfqueryparam value="#ARGUMENTS.filter.isUGM#" cfsqltype="cf_sql_bit" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'isOther')>
  		AND isOther = <cfqueryparam value="#ARGUMENTS.filter.isOther#" cfsqltype="cf_sql_bit" />
      </cfif>
      <cfif structKeyExists(ARGUMENTS.filter, 'order_by')>
  	ORDER BY #ARGUMENTS.filter.order_by#
  
negative.code: 		ORDER BY #ARGUMENTS.orderBy#
  	</cfquery>
  	
  	<!--- return the query by name --->
  	<cfreturn variables[queryName] />
  </cffunction>	
  
  