I have the following script that will fire off an email when a set number is achieved, ie: "minrequire" is set to 6. When six students have subscribed, an email is sent to the moderator. The problem is the email is being sent multiple times as more students subscribe, instead of only once at 6. Below is the script I am using. Why is this sending more than one emails?
<cfquery name="getNumber" datasource="#application.dsn#">
select CourseTitle, rid
from signups
where courseTitle = '#eventname#' and rid = '#rid#'
</cfquery>
<cfif getNumber.recordcount EQ #getCount.minRequire#>