Hello,

I trying to get this cfquery to run based on what link the user
clicks, i.e. if the user clicks 
"somepage.cfm?SubCategory1=#SubCategory1#" then the first part of the 
WHERE should execute else the the OR should execute.
I have tried CFQueryParam to no avail, here is the code
I am using so far. 

Rick

<cfquery name="qCart"
         datasource="dsMain"
         dbtype="ODBC">
       SELECT  ItemName, BrandName, RetailEach, RetailUnit, UnitSize, 
               DetailedDescription, ItemNumber, MainCategory, 
SubCategory1, SubCategory2
    FROM MasterItemTable
   <cfif isdefined(#SubCategory1#)>
    WHERE (SubCategory1 = '#SubCategory1#')
   <cfelse isdefined(#SubCategory2#)>
     OR (SubCategory2 = '#SubCategory2#')
   </cfif>
            
</cfquery> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to