> <cfquery name="check_email" datasource="localads">
> SELECT first_name,last_name,email FROM members WHERE email =
'#form.email#'
> </cfquery>
>
> I then need to do this kind of thing "If this Query returns TRUE, run the
> next block of code...if it's FALSE, then just exit" - but how?
The query won't return TRUE or FALSE. It returns a query set that contains
three fields: first_name, last_name, and email.
If you want to know if any records were found just check the RecordCount
attribute of the query. If this is 0 then no matching records were found.
<CFIF check_email.RecordCount>
<!--- this evaluates RecordCount as a boolean value: any non-zero value
will cause this block to execute --->
<CFELSE>
<!--- this will run if RecordCount is 0 (and thus evaluates to the
boolean
value of FALSE) --->
</CFIF>
Hope this helps,
Seth Petry-Johnson
Argo Enterprise and Associates
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.