Jump to content

Friend list


waynew

Recommended Posts

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

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

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.