Jump to content

pineapples

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

pineapples's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Those are the fields you are selecting from the table, from the code that you posted it looks like you just want to select friendname.
  2. You will be better off adding a new field to the friends table: friend_online int(1) not null. Then you can run a simple SQL query to find users online. $query = "SELECT * FROM friends WHERE username = '" . $session->username . "' and friend_online = 1;"; If you really want to use two tables then you can use a SQL join. $query = "SELECT friends.field, friends.field2 FROM friends INNER JOIN avaliable_users ON friends.username = avaibale_users.username WHERE username = '" . $session->username . "'";
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.