1: 2: 3: 4: 5: 6:
<cfquery name="checkUser" datasource="#request.datasource#"> select 1 from users where username = '#form.username#' </cfquery> <cfif checkUser.recordCount> <cfthrow detail="Username already exists, please select a different user"> </cfif>