Sure, but don't pass off what everyone else said about cfqueryparam, you'll be pretty salty the day some kid writes:
messages.cfm?thread=271; DROP CUSTOMERS; and have your database blown away. There are tools in your web server software that might have addressed this, but this is only one reason why it's good for you to validate the type of data your query is expecting. Ben Forta lays it out for you: http://www.macromedia.com/desdev/articles/ben_forta_faster.html Adam. > -----Original Message----- > From: Jeremy Bunton [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 15, 2002 3:59 PM > To: CF-Talk > Subject: RE: supposedly simple query > > > That is exactly what it was, first I took the > <cfoutput></cfoutput> out of > the <cflocation> and wrapped them around the <cflocation> > instead and it > worked. Then after reading Craig's post I took them out all > together and it > is working fine now. Thanks. > > > Jeremy > > > -----Original Message----- > From: Cantrell, Adam [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 15, 2002 4: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 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

