Try the code below. I added: <cfif qgetdetails.recordcount gt 0>
</cfif> Rick <cfquery name="qgetdetails" datasource="#test#"> Select * >From comments where confirmation = 1 </cfquery> <cfif qgetdetails.recordcount gt 0> <cfmail to="[email protected]" bcc="t...@123,t...@123" from="[email protected]" subject="Test" > Persons Name:#Name# Persons Email:#Email# Comments:#comments# </cfmail> </cfif> -----Original Message----- From: Damo Drumm [mailto:[email protected]] Sent: Monday, April 19, 2010 11:53 AM To: cf-talk Subject: <cfmail Hi Ive the below code and im trying to get it to check first that the confirmation field in the comments table is equal to 1 before it send at the minute its sending anyway any tips Thanks <cfquery name="qgetdetails" datasource="#test#"> Select * >From comments where confirmation = 1 </cfquery> <cfmail to="[email protected]" bcc="t...@123,t...@123" from="[email protected]" subject="Test" > Persons Name:#Name# Persons Email:#Email# Comments:#comments# </cfmail> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332980 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

