Posted: Tue May 01, 2007 5:37 pm
Now I have created the tables
Table 1 : user
Table 2 : Friends_list
Now I want to print 1's (Vivek's) friends i.e. Jatin, Anurag and Chandan
or 4's (Chandan's) friends list that is Vivek and Anurag
so what query Should I use??
Table 1 : user
Code: Select all
id | Name
-------------------
1 | Vivek
2 | Jatin
3 | Anurag
4 | ChandanCode: Select all
id1 | id2
-------------------
1 | 2
2 | 3
3 | 1
3 | 4
4 | 1Now I want to print 1's (Vivek's) friends i.e. Jatin, Anurag and Chandan
or 4's (Chandan's) friends list that is Vivek and Anurag
so what query Should I use??