Sorry if this has come through twice but i got a bounce back saying the email body was too long (so have deleted some now).
My problem is that i have a form on a dating site where when users sign up i create a row for them in my profile table. When collating their profile I also ask them what type of dates they'd like to meet, some of which are love, casual, friendship, travel mate. Each of these attributes are held in an attributes table. When i have taken all the user info i create the rows in the two tables. For the profile info it's pretty straight forward, but for the attributes i am finding it quite hard. i'll show you what i am doing. <!--- Insert profile details ---> <cfquery name="InsertProfileDetails" datasource="user020"> SET NOCOUNT ON INSERT INTO tbl_020publicProfiles (profileText, profileTitle, screenName, userID, acceptImages, dateSubmitted, location, age, gender, genderSeeking, confirmationID, profileIPAddress) VALUES ('#Form.profileText#', '#Form.title#', '#Form.screenName#', #CheckUser.userID#, #Form.acceptImages#, #UKtodayDate#, #Form.location#, '#Form.age#', '#Form.gender#', '#Form.genderSeeking#', '#confirmationID#', '#cgi.REMOTE_ADDR#') SELECT @@IDENTITY as profileID SET NOCOUNT OFF </cfquery> <!--- find all date types ---> <cfquery name="FindAttributes" datasource="user020"> SELECT attributeID FROM tbl_020publicAttributes </cfquery> <!--- roll through FindAttributes query inserting the values into the table ---> <cfoutput query="FindAttributes"> <cfif evaluate('form.attribute' & '_' & FindAttributes.attributeID) eq 'true'> <cfquery name="InsertProfilesAttributes" datasource="user020"> INSERT INTO tbl_020publicProfilesAttributes (profileID, attributeID) VALUES (#InsertProfileDetails.profileID#, evaluate ('form.attribute_' & 'FindAttributes.attributeID')) </cfquery> </cfif> </cfoutput> As you can see i'm having problems with putting the attributes values in as i am finding that you can't use the CF attribute function in an SQL statement. I am also wondering if there is any easier way to all this then the way i am doing it. Anyone have any ideas or am i doing it right? Any help at this point would be really helpful. Thanks, Stuart ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211936 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54