SPrelewicz
Programmer
Maybe I'm doing this wrong, but...
I have 3 tables relevant to this problem.
1. Master Users tables
-has USER_ID
2. Username Users
- has USER_ID
3. IP Users
- has user_id
The process goes as: We have 2 ways to authenticate, either IP or Username. I have 3 tables, one stores info on all users (Master Users), with an auto incremented user_id. This user ID is put into either one or the other child tables (Username users, IP Users) with relevant info for each user there. I want to query the db saying something like:
SELECT (either all fields from Master and Username or all fields from Master and IP) FROM (Either Master and Username or MAster and IP) WHERE (MAster.user_id='x' AND
Username.user_id='x' OR IP.username='x')
Any ideas?
Hope this makes sense and thanks in advance for your time.
Scott
I have 3 tables relevant to this problem.
1. Master Users tables
-has USER_ID
2. Username Users
- has USER_ID
3. IP Users
- has user_id
The process goes as: We have 2 ways to authenticate, either IP or Username. I have 3 tables, one stores info on all users (Master Users), with an auto incremented user_id. This user ID is put into either one or the other child tables (Username users, IP Users) with relevant info for each user there. I want to query the db saying something like:
SELECT (either all fields from Master and Username or all fields from Master and IP) FROM (Either Master and Username or MAster and IP) WHERE (MAster.user_id='x' AND
Username.user_id='x' OR IP.username='x')
Any ideas?
Hope this makes sense and thanks in advance for your time.
Scott