As someone else pointed out, no cfoutput needed. And as others have pointed out - cfqueryparam cfqueryparam cfqueryparam. This will also prevent certain types of URL/'SQL injection' hacking. (I myself am going through an existing application using cfqueryparam where I should have from the beginning - thanks Jochem! ;) )
Adam. > -----Original Message----- > From: Cantrell, Adam [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 15, 2002 3:33 PM > To: CF-Talk > Subject: RE: supposedly simple query > > > The cfoutput in your cflocation is causing unwanted spacing > in your URL. > > Try: > > <cfoutput> > <cflocation url="messages.cfm?thread=#formthread#"> > </cfoutput> > > instead of: > > <cflocation > url="messages.cfm?thread=<cfoutput>#formthread#</cfoutput>"> > > Adam. > > > > -----Original Message----- > > From: Jeremy Bunton [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, October 15, 2002 3:23 PM > > To: CF-Talk > > Subject: supposedly simple query > > > > > > I have this VERY simple query like > > > > <cfquery name="getmessages" datasource="mydns"> > > select * from message > > where thread = #threadnumber# > > </cfquery> > > > > where #threadnumber# is set by <cfset > > threadnumber=#trim(URL.thread)#> > > > > coming from a <cflocation > > url="messages.cfm?thread=<cfoutput>#formthread#</cfoutput>"> > > > > If I hard code in a number no problem it works but for some > > odd reason using > > the above I get > > [Microsoft][ODBC Microsoft Access Driver] Syntax error > > (missing operator) in > > query expression 'thread = 45'. > > Both fields are intergers. What ya think. > > > > Jeremy > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com

