About your first point, for what you say to happen, you'd also need quotes around the variable on the left:
<cfset someVar = "myVar"> <cfset "#someVar#" = "something"> <cfoutput> #myVar# </cfoutput> Without the quotes it'll error. Adrian -----Original Message----- From: Greg Morphis Sent: 23 April 2008 20:07 To: CF-Talk Subject: Re: My query is returning nothing and/or erroring out <cfset #cookiemainline# = 'XXXXX'> WTH? maybe you mean <cfset cookiemainline = 'XXXXX'> you're assigning the value to what CF translates cookiemainline into.. Most of the time, you don't need #'s in CF functions so, you dont need <cfif #myValue#.. just do a <cfif myValue.... to test the query results.. dump the query.. <cfdump var="#lookup#" /> After that.. try placing some cfoutput's in there to test.. E.G. <CFCOOKIE NAME="mainline" VALUE="#FORM.mainline#"> <cfif COOKIE.mainline NEQ ""> <cfset cookiemainline = COOKIE.mainline> <cfelse> <cfset cookiemainline = 'XXXXX'> </cfif> <cfoutput>#cookiemainline#</cfoutput> See if it's what it's suppose to be On Wed, Apr 23, 2008 at 1:57 PM, Michael Stevens <[EMAIL PROTECTED]> wrote: > I don't have to play with ColdFusion enough so I may be missing something > pretty simple... The full page can be found at > www.bctarizona.com/searchML.txt > > <cfquery name="lookup" datasource="AR"> > SELECT acct_id, date_ascii, invoice_num, order_num, item_code, stock_code, > main_line, qty, ink_1, ink_2, ink_3, ink_4 > FROM "QInvHisDetail" > WHERE main_line CONTAINS '#cookiemainline#' > ORDER BY date_ascii > DESC > </cfquery> > > The above give me the following error: > Syntax Error: SELECT acct_id, date_ascii, invoice_num, order_num, item_code, > stock_code, main_line, qty, ink_1, ink_2, ink_3, ink_4 FROM "QInvHisDetail" > WHERE main_line CONTAINS<< ??? >> 'Mike' ORDER BY date_ascii DESC > > If I change CONTAINS to LIKE it does not error out but it produces no output > other than the table row of headers. > > Now that I'm thinking about it it could be the output loop but I copied and > pasted the whole thing from another page that works. The only thing I > changed was the query name from Recordset1 to lookup and I changed it > everywhere else on the page. > > Anyone see my problem? > > Thanks, > > Mike ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304135 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4