It is as Dave suggested, you can not use CFQUERYPARAM as part 
of the actual SQL query.
You are writting the WHERE clause as a variable, remove the queryparam from 
that since you are declaring the variable.

----------------------------------------

                                From: JediHomer <jediho...@gmail.com>
Sent: Wednesday, December 17, 2008 3:17 AM
To: cf-talk <cf-talk@houseoffusion.com>
Subject: Re: cfqueryparam and LIKE operator error 

Try wrapping the QueryParams...

i.e.

Change (P.product_code LIKE value="%tents%">)

to (P.product_code LIKE (value="%tents%">))

HTH

2008/12/16 Mike Little :
> hi guys,
>
> getting an error using the following syntax...
>
> WHERE ((P.product_code LIKE ) OR (PD.product_title LIKE ) OR 
> (PD.product_description LIKE ))
>
> the error i get is...
>
> You have an error in your SQL syntax; check the manual that corresponds to 
> your MySQL server version for the right syntax to use near ') OR 
> (PD.product_title ' at line 9
>
> this was working fine till i added the cfqueryparams.
>
> mike
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316855
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to