cfquery qeustion, not sure about syntax
Hello;
Can someone tell me how to make this query work properly.
I need to make this query do 2 things in my where statement. one function is, any record with the number 2 in the categoryID field, is to be shown, I'm not sure how to write that. Here is my query:
<cfquery name="getMerch" datasource="#APPLICATION.dataSource#">
SELECT MerchName,MerchDescription, MerchPrice, MYFile, CategoryID
FROM Merchandise
WHERE merchID = #ATTRIBUTES.merchID# AND CategoryID = 2
</cfquery>
This part works fine: WHERE merchID = #ATTRIBUTES.merchID#
This part is wrong: AND CategoryID = 2
how would I write this? can anyone help?
thanks
