I have several queries on my site. I have a search.cfm that queries my database, then for each records I have a link coded in on the #item# column of my records.
I also have the ability for users to go to "section" pages that have queries based on the category type stored in my database.
I say all this because, originally I was passing a URL parameter which was bulbID so that the link would open the bulbsDetail.cfm based on which bulbID was passed.
I changed that so that the actual item would be passed in the URL for search engine reasons. Now however when I click on any bulb item that is all numbers, for example...13564 there is not problem. The bulbsDetails.cfm page displays properly.
When I click on an item that has letters in it, for example 60K19/DL, I get an error saying Unknown Column '60K19/DL' in 'WHERE clause'
Here is my query in question:
<cfparam name="URL.item" type="any">
<cfquery name="rsDetails" datasource="rlbulbs">
SELECT a.*, b.brandID, b.brandName
FROM rlbbulbs a, rlbbrand b
WHERE a.brandID = b.brandID
AND a.item = #URL.item#
</cfquery>
Not sure whats happeneing. Thanks for any help!