question about two table
Posted: Thu Oct 12, 2006 5:58 am
Assume there are two tables which are member message
member table
email name
abc@abc.com abc
def@def.com def
ghi@ghi.com ghi
message table
serial no sender_id receiver_id
1 abc@abc.com def@def.com
2 abc@abc.com ghi@ghi.com
Now, client will input sender email (eg: abc@abc.com), system need to display all information from message table which sender_id is abc@abc.com
Let's say the result should be
sender email sender name receiver email receiver name
abc@abc.com abc def@def.com def
abc@abc.com abc ghi@ghi.com ghi
What is the sql code if I need the above result? Thanks very much.
member table
email name
abc@abc.com abc
def@def.com def
ghi@ghi.com ghi
message table
serial no sender_id receiver_id
1 abc@abc.com def@def.com
2 abc@abc.com ghi@ghi.com
Now, client will input sender email (eg: abc@abc.com), system need to display all information from message table which sender_id is abc@abc.com
Let's say the result should be
sender email sender name receiver email receiver name
abc@abc.com abc def@def.com def
abc@abc.com abc ghi@ghi.com ghi
What is the sql code if I need the above result? Thanks very much.