i need some help for a mysl-statement. i have a table for "hotels" and a table for "pictogram". both are relatate with mm relation in table hotels_pictogram_mm. on the website the users can choose several pictogram in a search box. so i want to get all hotels which have for example "wellness" AND "free wifi". how must the sql statement be for this search.
following of course does not work:
SELECT *
FROM hotel
LEFT JOIN hotel_pictogram_mm ON hotel.uid=hotel_pictogram_mm.uid_local
LEFT JOIN pictogram ON hotel_pictogram_mm.uid_foreign=pictogram.uid
WHERE
pictogram.id = 3
AND pictogram.id = 5
thanks for help! martin