Hello everyone,
I've been doing some php programming lately and I have come in contact with a problem.
I have a table called "friends" and in that table I got 'user_id' and 'friend_id', I now want to do a query to see if two id's match, like this:
The only problem now is that the current user can only be 'user_id', so I think I may be able to use the OR statement to select rows with either $me/$someone as user_id or friend_id.. is this possible?PHP Code:$sql = "SELECT id FROM friends WHERE user_id = $me AND friend_id = $someone";
$result = mysqli_query($this->db,$sql);
$length = mysqli_num_rows($result);
mysqli_free_result($result);
![]()




Dan Schulz you will be missed 

Bookmarks