Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT m.* FROM menus m
- LEFT JOIN products p ON p.id = m.item_id AND m.item_type = 'product'
- LEFT JOIN categories c ON c.id = m.item_id AND m.item_type = 'category'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement