SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast aaron888's Avatar
    Join Date
    Apr 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to create the "twitter follower" feature ? How should DB look like ?

    Hello Wonderful Sitepoint Members,

    Recently I have been using twitter, and I really like their feature of "Followers". It is where people can subscribe to that user and follow that users updates.

    I would also like to implement this for my joke website.
    My jokes website has got many jokes uploaded by many members.
    Each member has their own primary key unique "ID".
    My member table is called "user".

    I also have a "jokes" table, where it stores the title of joke bla bla bla....
    each joke have a primary key called "jokeID"

    So, the question is,
    How do I create a feature like twitter, where people can subscribe to that joke member,
    and how should I set up the database based on that ? should every joke member have its own table and etc..


    Thanks so much for your guidance and advice.
    I appreciate your time taken to post a reply.
    Sample of coding would be good
    Thank you.

  2. #2
    SitePoint Member Gears's Avatar
    Join Date
    Dec 2008
    Location
    New Jersey, USA
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perhaps you could implement an RSS feed
    Creative Strategies & Branding
    Visit our Virtual Office! - Follow me on Twitter

    Creative Design, Full Color Printing, Cust. Service Consultancy

  3. #3
    SitePoint Enthusiast aaron888's Avatar
    Join Date
    Apr 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Gears View Post
    Perhaps you could implement an RSS feed
    sounds like a good solution, and a good way out.
    did you mean, an RSS feed for each joke member ?

    then u mean... all the normal users... subscribe to that member ?

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For the database, make one separate table named followers.

    leader | follower
    --------------
    5 | 322
    5 | 654
    5 | 999


    Those are userids

  5. #5
    SitePoint Enthusiast aaron888's Avatar
    Join Date
    Apr 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by crmalibu View Post
    For the database, make one separate table named followers.

    leader | follower
    --------------
    5 | 322
    5 | 654
    5 | 999


    Those are userids
    ahh yes. great db layout I was looking for.
    Thanks crmalibu


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •