Servus,
Wobei man dann alle Daten doppelt hat, weil man eine Tabelle User und eine Tabelle Friends braucht, in denen dann das gleiche steht.
Nein. die friend_id bezieht sich natuerlich auch auf die id des users in der user-Tabelle. Ausgehend von...
Tabelle User:
id | user
1 | John
2 | Doe
3 | Foo
4 | Bar
etc.
Verknüpfungstabelle
user_id | friend_id
1 | 2
1 | 4
2 | 1
4 | 3
etc.
...hat also John sowhol Doe als auch Bar in der Friendslist, Doe hat John in der FL, Foo niemanden und Bar hat Foo als Freund.
Gruss
Patrick
--
sh:( fo:| ch:? rl:( br:> n4:( ie:% mo:) va:} de:> zu:) fl:| ss:| ls:[ js:|
sh:( fo:| ch:? rl:( br:> n4:( ie:% mo:) va:} de:> zu:) fl:| ss:| ls:[ js:|