From the URL 'http://www.example.com/community/teams/photo-gallery'. Using the path /community/teams/photo-gallery
how can I query the database to get the results of the menu. Please note that the menu slug are not unique.
So that means only results about community
, teams
, photo-gallery
should show.
Here is my attempt
SELECT * FROM menu WHERE menu_slug = 'community' AND menu_slug = 'teams' AND menu_slug = 'photo-gallery'
This Query won't work in my situation
SELECT * FROM menu WHERE menu_slug = 'community' OR menu_slug = 'teams' OR menu_slug = 'photo-gallery'