jriver12
asked on
help looping thru query results
I am not getting the results that I want an would like to know if some one could help.
this first query returns a multiple of records based on a value that is passed from a form.
<cfquery name="View_Cross_check" datasource="show">
SELECT CompvisitNumber, competitor
FROM dbo.competitor
WHERE (competitor LIKE '#form.CompanyName#')
</cfquery>
in my example I had returned a recordcount of 6 individuals for this company like this
(competitors)
1 2 3 4 5 6.
now my issue is using the above records returned must now query using the following to get the remaining information.
<cfquery name="View_cross_check_res ults" datasource="show">
SELECT visitor_Co_Name, BT_Booth1, visitorNumber
FROM visitor_INFO INNER JOIN
Booth_Information ON visitorNumber = BT_visitorNumber
WHERE (vistiorNumber = '#view_cross_check. competitor#')
</cfquery>
all I want is to return the name, booth1 and vistornumber to a table.
what I am receiving is that it is only showing up with 1 record when I know that there is six.
I have learned how to break this up if it was a commadelimited string but dont know how to loop with indiv records.
help
this first query returns a multiple of records based on a value that is passed from a form.
<cfquery name="View_Cross_check" datasource="show">
SELECT CompvisitNumber, competitor
FROM dbo.competitor
WHERE (competitor LIKE '#form.CompanyName#')
</cfquery>
in my example I had returned a recordcount of 6 individuals for this company like this
(competitors)
1 2 3 4 5 6.
now my issue is using the above records returned must now query using the following to get the remaining information.
<cfquery name="View_cross_check_res
SELECT visitor_Co_Name, BT_Booth1, visitorNumber
FROM visitor_INFO INNER JOIN
Booth_Information ON visitorNumber = BT_visitorNumber
WHERE (vistiorNumber = '#view_cross_check. competitor#')
</cfquery>
all I want is to return the name, booth1 and vistornumber to a table.
what I am receiving is that it is only showing up with 1 record when I know that there is six.
I have learned how to break this up if it was a commadelimited string but dont know how to loop with indiv records.
help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I must remember to k.i.s.s.
Thanks a mil :)