Query this table either to determine which users have sent friend requests to the logged-in user or to query whether a friend request has been sent from the logged-in user to a specific user. You can run this query only when the
uid_to is set to the logged-in user or when
uid_from is set to the logged-in user and
uid_to is set to a specific user.
Highlighted rows are indexable / searchable and one is usually required in the WHERE portion of the query.
|uid_from||int||The user ID of the user making the friend request.|
|uid_to||int||The user ID of the user receiving the friend request (which must be the logged-in user if uid_from is not the logged-in user).|
SELECT uid_from FROM friend_request WHERE uid_to=204686
SELECT uid_to FROM friend_request WHERE uid_from=9074 AND uid_to=4