justlukeyou Posted June 18, 2012 Share Posted June 18, 2012 I saw this site and Im curious how the social network follow system would work. Its very similiar to Facebook. Does each user a have a table with columns 'Follow1', 'Follow2' etc. So when another user clicks the follow button their unique user ID drops into the first 'Follow' column available. For example if ID 123456 is the first user to follow ID 654321. The ID number 123456 is entered into 'Follow1' and so on. Then you can echo information using the ID number? www.houzz.com/ Link to comment https://forums.phpfreaks.com/topic/264376-how-to-follow-people-using-php/ Share on other sites More sharing options...
Mahngiel Posted June 18, 2012 Share Posted June 18, 2012 You'd have one table and it'd look similar to this: | relation_id | follower_id | followed_id | token | token | token | You can then get the IDs of whom a person is following and is followed by with one query. Link to comment https://forums.phpfreaks.com/topic/264376-how-to-follow-people-using-php/#findComment-1354822 Share on other sites More sharing options...
justlukeyou Posted June 18, 2012 Author Share Posted June 18, 2012 Thanks, so is 'Token' the unique ID number? I thought each column name had to have a unique name. What does 'relation_id' mean? Link to comment https://forums.phpfreaks.com/topic/264376-how-to-follow-people-using-php/#findComment-1354917 Share on other sites More sharing options...
Mahngiel Posted June 18, 2012 Share Posted June 18, 2012 Thanks, so is 'Token' the unique ID number? I thought each column name had to have a unique name. No, the 'token's can be whatever you want, they don't mean anything. the relation_id is the auto increment and unique column. Link to comment https://forums.phpfreaks.com/topic/264376-how-to-follow-people-using-php/#findComment-1354928 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.