Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 28th, 2004, 05:31 AM
Authorized User
Join Date: Oct 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default selecting records from multiple tables


i have a very simple database in ACCESS : with the following table

member_details : which has fields :


i use the following to display results :

strSql = "SELECT * FROM member_details order by " & sort_order
set rsConfig = my_Conn.Execute (strSql)
<TR BGCOLOR="<%=v_bgcolor%>">
<TD align="middle" class="boldtable"><a href="select_member.asp?<%=rsConfig("Member_ID")%> "> <%=rsConfig("Member_ID")%> </a></TD>
<TD align="middle"><%=rsConfig("Forename")%></TD>
<TD align="middle"><%=rsConfig("Surname")%></TD>
<TD align="middle"><%=rsConfig("Home_Number")%></TD>
<TD align="middle"><%=rsConfig("Mobile_Number")%></TD>

the above code is cut down : i also have the ability to change the sort order depending on which column header is selected.

i now want to add another table called member_stats which will include


i want to incorporate these results in the above results table : but for the results to be associated with the correct member_id dependant on the sort order ( i.e forename, surname or member_id ).

obviously this would be easy if i added these fields to my existing member_details table : but i want to know how to do this for the future.

do i have to do a subselect within the WHILE loop for this new table ? or is there a nice neat way of doing this?

thanks in advance


Old October 28th, 2004, 05:36 AM
Authorized User
Join Date: Oct 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts

OMG !!! how embarassing !!! my brain must have deserted me this morning !!! i just use a sql inner join !!!


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting records in a query firefighter2045 Access VBA 5 August 28th, 2008 08:14 AM
selecting records from excel androoo Pro VB 6 1 January 12th, 2005 12:18 PM
Selecting the Latest Records gordbro Access 3 September 16th, 2004 07:21 PM
ASP - Selecting Multiple Records Ei0nN Classic ASP Databases 2 May 28th, 2004 03:38 PM
selecting multiple records as one record array Greywacke Classic ASP Databases 1 February 10th, 2004 10:33 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.