I'm having some problems with INTERSECT command
. Hope someone could help me.
I want to get the the movieid that appears in the first and second SELECT
. After that I want to use these data (that could be in a LIMIT
of 10) to receive the titles of the movie in another table.
Something like this, but I'm not doing right:
SELECT movieid
FROM ratings
WHERE votes > 0
INTERSECT SELECT movieid FROM genres WHERE genre = '$_SESSION[genero]'
In this case I should get the movied that appear both on ratings and genres tables.
After this, I want to get these movieids and search the table movies for the movieid and finally show the title. Thank you!