Question: I want to execute a query where I can find one ID in a list of ID.

table `user` 

```
id_user | name  | id_site
-------------------------
1       | james | 1, 2, 3 
1       | brad  | 1, 3 
1       | suko  | 4, 5

```

and my query (doesn't work)

```
SELECT * FROM `user` WHERE 3 IN (`id_site`) 

```

This query work (but doesn't do the job) 

```
SELECT * FROM `user` WHERE 3 IN (1, 2, 3, 4, 6) 

```

Answer: 
That's not how `IN` works. I can't be bothered to explain why, just [read the docs](http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_in)

Try this:

```
SELECT * FROM `user` WHERE FIND_IN_SET(3,`id_site`)

```

Note that this requires your data to be `1,2,3`, `1,3` and `4,5` (ie no spaces). If this is not an option, try:

```
SELECT * FROM `user` WHERE FIND_IN_SET(3,REPLACE(`id_site`,' ',''))

```

Alternatively, consider restructuring your database. Namely:

```
CREATE TABLE `user_site_links` (
    `id_user` INT UNSIGNED NOT NULL,
    `id_site` INT UNSIGNED NOT NULL,
    PRIMARY KEY (`user_id`,`site_id`)
);
INSERT INTO `user_site_links` VALUES
    (1,1), (1,2), (1,3),
    (2,1), (2,3),
    (3,4), (3,5);
SELECT * FROM `user` JOIN `user_site_links` USING (`id_user`) WHERE `id_site` = 3;

```
The WHERE IN clause is useful to replace many OR conditions.
For exemple

```
SELECT * FROM `user` WHERE id IN (1,2,3,4)

```

is cleaner than

```
SELECT * FROM `user` WHERE id=1 OR id=2 OR id=3 OR id=4

```

You're just trying to use it in a wrong way.

Correct way :

```
WHERE `field` IN (list_item1, list_item2 [, list_itemX])

```