0

Hi, this is irphan . i am creating social networking site and need a friend system like facebook] . i don't have any idea aout this .can anyone help me?kindly tell me how many tables would require to manage friend system and how can i manage them. i am working in php.this help w'll be highly appreciated.thanks

3
Contributors
4
Replies
7
Views
6 Years
Discussion Span
Last Post by irphan
0

What i did for one of my previous sites was to have just one table named "friends" and then have the following columns:

id | friendTo | friendFrom | status

So when a user send a friend request your PHP files inserts the following row to your table such as:

1 | Daniel | Bluecharge | Pending...

Then on the users friends page, any requests will be fetched from the database in a while loop and then have accept or decline

The accept will update the status from Pending... to Completed...

Then the users accepted friends will be fetched with the status of "Completed..."


I know what i mean as i have did this but if you dont understand im sorry, i tried my best to explain but had difficulty in doing so.

Daniel

0

Thanks Daniel for reply i had done this work. i have friends table but i want whole description .like when anyone reject the friend request what i w'll have to do.so please tell me something more ....so that i could complete this module.

Edited by irphan: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.