• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problems with Verity and displaying search results

New Here ,
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied


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!!!
TOPICS
Advanced techniques

Views

413

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

if you dump your rsSearch - You'll likely find things like 'title' and 'custom1' etc. These are the columns you need to return in your output.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

LATEST
Thank you very much!! I knew it had to be something I was overlooking!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation