Solved

what is going on with these results.

Posted on 2002-03-19
4
134 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
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
winningl earned 50 total points
Comment Utility

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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now