Solved

what is going on with these results.

Posted on 2002-03-19
4
156 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
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 …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

777 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