This is the first time I'm using Verity. I'm trying to create
a search feature for a MySQL Database. The search works fine, but
when I try to display the results, I get the following error
message: "Variable ITEMNR is undefined" (ITEMNR is the variable I'm
trying to display).
Here is the full code:
<cfquery name="rsSearch" datasource="dsnaffemann">
SELECT itemnr, itemname, descr1, descr2, size, price, brand
FROM tbproducts
</cfquery>
<cfindex
query="rsSearch"
collection="affsearch"
action="refresh"
type="Custom"
key="itemnr"
title="itemnr"
body="itemnr,itemname,descr1,descr2">
<cfsearch
collection="affsearch"
name="rsSearch"
criteria="#URL.criteria#">
<cfoutput>
Your search returned #rsSearch.RecordCount# items(s).
</cfoutput>
<cfoutput query="rsSearch">
#itemnr#
</cfoutput>
If I remove "<cfoutput query="rsSearch"> #itemnr#
</cfoutput>", the search works fine and displays the record
count of items found.
Does anyone have an idea as to what I'm doing wrong?
Thanks!!!