SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2001
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Advice on Joining Info

    I have developed a forum written in PHP with a mysql backend. The forum has a table, but I also have a table with members info, and another table that has a "friends" list. The friends list has the member and who they are friends with, like so:
    [ID] - [Member] - [Friend]
    On slashdot and other sites, they show for relationships of members. For instance, your friends might show up in a different color or something similar. Does anybody have any advice on whats the best way to accomplish this? I'm not sure how to setup or change my table structure and was just wondering if anybodys had any experience programming a similar system. Thanks for any help.

  2. #2
    SitePoint Evangelist
    Join Date
    Dec 2000
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Advice on Joining Info

    I'm not sure if this is the most efficient way, but here's how I'd do it:

    Every time a post is pulled from the database, check and see if the poster's ID is the same as any entry in the user's friend's table. If it is, then put a different color font around the poster's ID. If not, just display the poster's ID.
    Corbb O'Connor
    Looking for quality website design or database programming?
    Contact me for more information and a FREE quote!


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
  •