My table has these two ids: IDUser | followingID.
IDUser is the logged in users ID. FollowingID is the ID of the user they want to follow.
I now want to check if their relationship already exists in the following database:
I've tried:
SELECT EXISTS IdUser, followingID FROM following WHERE $id, $followingId"
But that doesn't seem to work.
What would the query be to check if two IDs already exist in a database. Both must exist and must be together in a relationship, not separately. IdUser and followingID are two separate columns showing side by side.