SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question linking friends (was "serious question...")

    As i stated earlier i m planning to make a simple hi5 using the help of Sitepoint forums... Work is going on and the problems occurs in below
    > i had made a table `frensNetwork` which has `user_id`,`fren_id`
    fields.....
    suppose i had following entered fields
    /user_id/ fren_id
    1 / 2
    1 / 5
    1 / 3
    2 / 5
    2 / 8
    5 / 22
    (Note: 1 / 2 are values entered in user_id and fren_id fields respectively)

    Suppose i m the user having user_id `1` . if i opens my profile and clicks on the 2,5,7 user_id's photo then it should show the status You<->2 OR 5 OR 7
    as seen in HI5. But if i go to 2's profile and clik on user_id 8 then it should disply in the status as You<->2<->8.
    (i hope u got my problems)
    if the networks go huge then we have to generalizse the status...This is the think i want............
    Can anybody provide the algorithm or Idea of linking friends as You<->xxx<->YYY
    Note: Credit will be given for the help as will be dispalyed as "FrensNetwork Idea BY:[ ]" in the about us section
    Thank U for reading

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i think i get what you're saying. if i log in to your site and i click on my friend rudy, then click on rudy's friend matthew, i should see a chart show that i clicked on rudy, then on matthew. right?

    this is not a task that mysql will complete for you. what you need to do is store each name as you click on them in your host language's session data storage.

  3. #3
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply....
    But there seems a problems using the SESSION
    Suppose if the user opens the 2's id , 3's id , 8's id in new window then retrieving from the SESSION will cause to display the follwing results
    You<->2<->3,<->8...which is quite undesired........
    Can u please explaing more briefly using sessions to solve above problems

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i don't have a good answer for that. what is your host language? you will probably have better luck getting a good answer from that forum as it's usually the host language that deals with these types of issues, not mysql.

  5. #5
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again for the reply
    i am using php with mysql
    Thank u


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
  •