Jump to content


Photo

linking two tables together


  • Please log in to reply
4 replies to this topic

#1 WormTongue

WormTongue
  • Members
  • PipPip
  • Member
  • 13 posts
  • LocationIllinois

Posted 16 April 2003 - 06:21 PM

Hello. I am very new to the whole mysql/m$sql and i was wondering what the easiest way is to link two tables together. Here is my situation: I have a membership system where users log on to check their account info and such. The log in info is stored in a different table than the rest of the data. So, what i want is when they log in, it points from the login table to the member table that has all of their account information. Is there any easy way to do this? Thanks for your help.
WHOHOO! I am now a Forum Regular!! :)

#2 Avalanche

Avalanche
  • Members
  • PipPipPip
  • Advanced Member
  • 73 posts

Posted 16 April 2003 - 06:23 PM

You want it to record when they logged in into the login data table and then switch over to the members table to execute member only stuff?
DEFINE("YOU","Spending Too Much Time On The Computer");

#3 WormTongue

WormTongue
  • Members
  • PipPip
  • Member
  • 13 posts
  • LocationIllinois

Posted 16 April 2003 - 06:27 PM

yea, basically. If i understand where you are going, could i just change tables in my query statements to the member table? Is this is easiest way? What i was thinking was a way to link the two so that i don\'t have to change my query statements. I guess have the login table call the member table for me then i just have to access one table. Does this make sense?
WHOHOO! I am now a Forum Regular!! :)

#4 Avalanche

Avalanche
  • Members
  • PipPipPip
  • Advanced Member
  • 73 posts

Posted 16 April 2003 - 06:52 PM

I\'m not sure. I\'d just use two queries (you don\'t have to change the first one, just make another).
DEFINE("YOU","Spending Too Much Time On The Computer");

#5 WormTongue

WormTongue
  • Members
  • PipPip
  • Member
  • 13 posts
  • LocationIllinois

Posted 16 April 2003 - 07:12 PM

Ok, let me better clarify what i\'m thinking. We have a membership database with everybodies info in it. We want to put that online so members can update their info and such through the web. We are going to have them signup with their username being their e-mail address. I need to find a way to link their e-mail address with their info in the membership database.

Now we do have their e-mail in their account, but that information has not been updated in a long time since we never needed it until now. I don\'t want to call each person to get their correct e-mail address, so i would like to link their username(e-mail address) with their name and not by e-mail. The only problem is that i don\'t know how to do this...
WHOHOO! I am now a Forum Regular!! :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users