But why is it that it doesn't give me a result. I added the '%AAA' and 'AAA%' because I didn't get any results using the '%AAA%' When I use:
ref_number = 'Url.ref_number'
and I use the right ref_number it obviously returns the record I was looking for, but as soon as I replace it in my query with:
ref_number LIKE '%Url.ref_number%'
it doesn't. Can it be, bcause I use two WHERE clauses in the query like this:
<cfif structKeyExists( Url, "ref_number" )>
ref_number = <cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim( Url.ref_number )#" />
<cfelseif structKeyExists( Url, "product" )>
product_id = <cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim( Url.product )#" />
Excuuus me for using CF code in this post but I didn't know how else to express it