I have an SQL table and I need to select all the records where username (MM_Session) is in another users following list (Users SQL table, following column), which would look like this
username1 username2 username3 username4
So far, my SQL query looks like this:
SELECT *
FROM Users
WHERE Users.Following_By LIKE '" . $_SESSION['MM_Username'] . "'
Except that doesn't seem to return any values even though the user's username is in the other users following list.
Should I be using 'IN' instead of 'LIKE'?
Does anyone have any other ideas why this isn't working?
Thanks