Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

what is going on with these results.

Posted on 2002-03-19
4
Medium Priority
?
183 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 200 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

730 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