This query doesn't work
SELECT * FROM Catalogue WHERE Catalogue.ID IN (
SELECT ID_catalogue FROM Categories WHERE Categories.Product_type='xxx'
)
Error Code : 1064 You have an error in your SQL syntax near 'SELECT ID_catalogue FROM Categories WHERE Categories.Product_type='xxx' ) ' at line 2
Ok, that's because I am using a very old MySQL version.
What I am trying to get is
SELECT * FROM Catalogue WHERE Product_type='xxx' OR Catalogue.ID IN (
SELECT ID_catalogue FROM Categories WHERE Categories.Product_type='xxx'
)
Is there any equivalent for that?
Thank you for all your comments.