I have the following MySQL table called skills.
| id | idUser | idSkill |
|---|---|---|
| 1 | 4 | 1 |
| 2 | 8 | 4 |
| 3 | 8 | 9 |
| 4 | 13 | 9 |
| 5 | 18 | 2 |
| 6 | 22 | 1 |
| 7 | 27 | 2 |
| 8 | 32 | 4 |
| 9 | 11 | 2 |
| 10 | 32 | 9 |
I need to select, for example, all idUsers that have idSkill 4 and 9 at the same time.
The result would be idUser 8 and 32.
How can I create such a query with PHP and MySQL?
Many thanks