waynew Posted August 19, 2008 Share Posted August 19, 2008 I'm designing a system that allows users to add each other as friends and was wondering if anyone had a better way of designing a table for such a system. What I have is: <?php mysql_query(" CREATE TABLE friends( friendship_id BIGINT(50) NOT NULL AUTO_INCREMENT, user_a BIGINT(50) NOT NULL, user_b BIGINT(50) NOT NULL, PRIMARY KEY(friendship_id))") or die(mysql_error()); ?> Link to comment https://forums.phpfreaks.com/topic/120370-friend-list/ Share on other sites More sharing options...
efficacious Posted August 19, 2008 Share Posted August 19, 2008 well you'd atleast just need to create a table for each possibilty your giving them.. as far as options go.. Date Added //Newly added friends Date Removed //Recently Removed friends FriendName //Name of friend Ignored //People that are not friends ect.. Link to comment https://forums.phpfreaks.com/topic/120370-friend-list/#findComment-620186 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.