Getting rows which include a value with MySQL
- by sundowatch
I have a MySQL query which gets including some vars like that:
messages TABLE receiver cols
user1 rows : 1,3,5
user2 rows : 2,3
user3 rows : 1,4
I want to get rows which includes '3' value. So I will get 'user1' and 'user2'.
I tried that but naturally it doesn't work.
mysql_query("SELECT * FROM messages WHERE receiver='3'");
How can I do this?