![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 30 Pomógł: 0 Dołączył: 12.07.2006 Ostrzeżenie: (0%) ![]() ![]() |
Mam system znajomych oparty na tabeli 'friends':
friends_id friends_from friends_to friends_accepted Do tego jest tabela z użytkownikami, która łączy się z tą: (w skrócie) user_id user_login Mam pytanie jak najprościej pobrać listę znajomych użytkownika x posortowaną według loginów? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Moderatorzy Postów: 15 467 Pomógł: 1451 Dołączył: 25.04.2005 Skąd: Szczebrzeszyn/Rzeszów ![]() |
A:
Kod select * from friends left join users on friends.from = users.user_id UNION select * from friends left join users on friends.to = users.user_id ?
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 12.10.2025 - 15:37 |