Jump to content

making a friends list


kobel4k3r5

Recommended Posts

A better structure is to have one row for each friend relationship.  You'll need 2 tables.

The first table will store the user's name, user id and other data (password, name, etc etc).

The second table will have two columns, "id1" and "id2".  A row in that table means "id2 is a friend of id1".

The problem with using columns is that you don't know how many columns you need.  Rows make life much easier :)
Link to comment
https://forums.phpfreaks.com/topic/20821-making-a-friends-list/#findComment-92246
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.