|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I want to create a table that contains user info. From that list i want to be able to create a buddy list. for example:
I have 4 users bob, sally, jack and mary. Bob has sally, jack and mary as buddies. Sally has bob and mary as buddies. Jack has bob, sally and mary as buddies. Mary hase sally and jack as buddies. what is the best way to set this up? Thanks for any help. |
|
#2
|
|||
|
|||
|
You can make one table of users (userid, username,other info) and a table of buddies (user_id,buddy_id) that are both fks to userid in your users table. Each user-buddy pair then becomes its own row in buddies.
__________________
"A pawn is the most important piece on the chessboard -- to a pawn" |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > newbie help on a list of users |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|