oops, I replied to the wrong thread! please disregard!
+-----------------------------------------------+ Bryan Love Macromedia Certified Professional Internet Application Developer Database Analyst TeleCommunication Systems [EMAIL PROTECTED] +-----------------------------------------------+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis -----Original Message----- From: Bryan Love [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 1:50 PM To: CF-Talk Subject: RE: Mysterious second set of single quotes the most obvious answer is to not write anything to the db until they have confirmed all is correct. Just pass the form fields through to the next page... +-----------------------------------------------+ Bryan Love Macromedia Certified Professional Internet Application Developer Database Analyst TeleCommunication Systems [EMAIL PROTECTED] +-----------------------------------------------+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis -----Original Message----- From: Ray Bujarski [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 1:38 PM To: CF-Talk Subject: Mysterious second set of single quotes I have a variable I build before inserting into my query called where <cfset where = "#where##table#id = '#attributes.id#'"> Then I put into my query... <cfquery name="search" datasource="#session.datasource#"> SELECT t.id,t.product_name,t.operator,t.stage,t.qc_lot,r.s4_time,r.s5_time FROM trip_data t, report_stamps r WHERE t.id = r.id AND #where# </cfquery> If I output the variable before the query like so (line 2) I get t.id='100' 1. <cfset where = "#where##table#id = '#attributes.id#'"> 2. <cfoutput>#where#</cfoutput><cfabort> 3. <cfquery name="search" 4. datasource="#session.datasource#"> 5. SELECT t.id,t.product_name,t.operator,t.stage,t.qc_lot,r.s4_time,r.s5_time 6. FROM trip_data t, report_stamps r 7. WHERE t.id = r.id AND #where# 8. </cfquery> However when I ditch line 2 the query output has two single quotes surrounding my variable. EXAMPLE OUTPUT IN QUERY 1. SELECT t.id,t.product_name,t.operator, 2. t.stage,t.qc_lot,r.s4_time,r.s5_time 3. FROM trip_data t, report_stamps r 4. WHERE t.id = r.id AND t.id = ''100'' Notice line 4 Does anyone know why CFML adds this mysterious second set of single quotes when I output within the cfquery tags? Ray Bujarski Direct 858-845-7669 Pager 858-636-9900 ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists