Solved

what is going on with these results.

Posted on 2002-03-19
4
174 Views
Last Modified: 2013-12-24
<CFQUERY NAME="view_Q_CoName" DATASOURCE="show">
SELECT      BT_Booth1, visitorNumber, EX_Co_Name, EX_visitor_code
FROM         {oj EXH_CONTACT_INFO LEFT OUTER JOIN Booth_Information ON visitorNumber = BT_visitorNumber }
WHERE       (EX_Co_Name like '%#form.ex_co_name#%')
</CFQUERY>

using this query I am retrieving some records (duh)
now my issue is that my variable may return 2 records with the same name but different primary key ids


the results are displayed as such
current record        Coname      Code

the coname field is a "href" which is carring the visitor number in the url.

the issue is that when 2 records are found with the same number the url.visitornumber is now a number that is made up of the 2ids found and only one visitor is displayed. how would I get both records to be displaye and the proper visitor numbe to be carried over the url.correctly.

this is how I am using the href:

<a href="ex_show.cfm? &visitortornumber=<cfoutput>#Q_coname.visitornumber#</cfoutput>">#EX_CO_NAME#</a>
0
Comment
Question by:jriver12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
winningl earned 50 total points
ID: 6880327

Try loop through the query:

<cfoutput query="view_Q_CoName">

<a href="ex_show.cfm? &visitortornumber=#visitornumber#">#EX_CO_NAME#</a> <BR><BR>

</cfoutput>

winningl
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6880351
try this:
<a href="ex_show.cfm?visitortornumber=<cfoutput>#ValueList(view_Q_CoName.visitornumber,",")
#</cfoutput>">#EX_CO_NAME#</a>

Now this will return a comma delimited list as the values.

IN your ex_show.cfm
change your query to be:

<CFQUERY NAME="ex_show" DATASOURCE="show">
Select * from yourtable
where id in (#URL.visitortornumber#)
</CFQUERY>

CJ
0
 

Author Comment

by:jriver12
ID: 6880490
found my issue I had the group attribute of the output query set to Coname, there for being that the records had the same name they where joined and seen as one.

I change that attribute to be visitor number and it now shows the records individualy.

problem solved.


thanks for the input
0
 

Author Comment

by:jriver12
ID: 6880498
Both solutions are good ones  so this is what I am going to do :

winningl:  come get these points.


cj: get the points posted to you on my next thread addressed to you.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question