mySQL help

Discussion in 'Web Development and Programming' started by goblues, Jan 20, 2012.

  1. goblues

    goblues Regular Member

    Joined:
    Apr 13, 2011
    Messages:
    90
    Likes Received:
    54
    Location:
    St Louis MO
    Left joins suck :P

    I have a huge headache I am hoping someone can cure by helping me with some code.

    I have 2 tables:
    user_online
    user

    user_online only holds user_id
    user has user_id and user_name

    I need code to grab and list user_name(s) of the user_id(s) that are present in the user_online table

    Clear as mud? Thanks for anyone offering any help.
     
  2. goblues

    goblues Regular Member

    Joined:
    Apr 13, 2011
    Messages:
    90
    Likes Received:
    54
    Location:
    St Louis MO
    Oh, and if you could incorporate, I also need
    $num_rows = mysql_num_rows($result);
    of only the user_online table
    Not sure how to include this in the above needed query if at all possible to save an additional query
     
  3. Realitytvaddict

    Realitytvaddict Regular Member

    Joined:
    Aug 10, 2012
    Messages:
    60
    Likes Received:
    23
    Location:
    Chicago, IL (Looking to move for a job!)
    Are you still looking for help?
     
  4. goblues

    goblues Regular Member

    Joined:
    Apr 13, 2011
    Messages:
    90
    Likes Received:
    54
    Location:
    St Louis MO
    Nope. Got it worked out. Thanks though!
     
  5. Brandon

    Brandon Regular Member

    Joined:
    Jun 1, 2009
    Messages:
    6,602
    Likes Received:
    1,707
    Location:
    Topeka, Kansas
    First Name:
    Brandon
    I didn't even see this question, glad you got it worked out though.
     

Share This Page