Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 28th, 2004, 05:31 AM
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default selecting records from multiple tables

Hi

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

member_details : which has fields :

Member_id
Forename
Surname
home_number
mobile_number

i use the following to display results :

<%
strSql = "SELECT * FROM member_details order by " & sort_order
set rsConfig = my_Conn.Execute (strSql)
WHILE NOT rsConfig.EOF
%>
<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>
</TR>
<%
rsConfig.MoveNext
WEND
%>

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

member_id
score
member_game_info.

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

dave

Reply With Quote
  #2 (permalink)  
Old October 28th, 2004, 05:36 AM
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

sorry

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.