MySQL Forums
Forum List  »  Newbie

struggling with this query from two tables? anyone..
Posted by: hallian hall
Date: August 27, 2004 11:22AM

I have two tables called "sites" and "hosts."

This is my hosts table:

id | hostname
===========
1 | athens
2 | soccer
3 | football
4 | baseball

THis is my sites table:

id | host_id_1 | host_id_2 | expires
==============================
1 | 4 | 1 | 2008-12-31
2 | 3 | 2 | 2003-12-12
3 | 2 | 1 | 2005-10-10
4 | 4 | 3 | 2007-10-10



Now, I want to see all records for "athens" which is id=1 from host table. Now, I want to see and matching all instances of id "1" with any other id's from sites tables. I trying to get this.....

baseball - athen - 2008-12-31
soccer - athens - 2005-10-10

Thanks
hallian

Options: ReplyQuote


Subject
Written By
Posted
struggling with this query from two tables? anyone..
August 27, 2004 11:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.