SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2008
    Location
    HidePoint
    Posts
    195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Users and friends database

    i wonder how the user and his friends list are built using databases.

    is this the way.. or if there is a better solution please tell me


    users(id, name, email, username, password)
    freinds(id, user_id, friend_id, status)


    main think i wonder is ...

    Lets say A sent a friend request to B .. and B accepted it and they are friends.. when populating the friends list on their respective profile how to get the friends when B is refernced under friend_id... and not under user_id.. since A had sent the request.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,220
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    the friends database has been discussed many times in this forum

    please do a search for "friends" in this forum
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2008
    Location
    HidePoint
    Posts
    195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    the friends database has been discussed many times in this forum

    please do a search for "friends" in this forum
    Thanks a lot.. is there something for rating also ?


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
  •