Forum Moderators: coopster
Simplifing my db a bit, say I have two tables: one stores the movies I own, another stores the genres for each of those movies. Example:
----------------
¦ Movie .......¦
----------------
¦ Total Recall ¦
----------------
¦ Commando ....¦
----------------
---------------------------
¦ Movie .......¦ Genre ...¦
---------------------------
¦ Total Recall ¦ Action ..¦
---------------------------
¦ Total Recall ¦ Sci-Fi ..¦
---------------------------
¦ Commando ....¦ Action ..¦
---------------------------
¦ Commando ....¦ Military ¦
---------------------------
--------------------------------------
¦ Movie .......¦ Genre ...¦ Genre ...¦
--------------------------------------
¦ Total Recall ¦ Action ..¦ Sci-Fi ..¦
--------------------------------------
¦ Commando ....¦ Action ..¦ Military ¦
--------------------------------------
Another thing I'd like to do is to be able to exclude a movie based on one of these genres, even if it's also in a genre I'm looking for. For example, if I wanted a list of all "Action" movies that aren't also "Sci-Fi" movies, it should only list "Commando" from above.
Are these things that are possble to do with just a SELECT statement, or will it require a combo of SQL and PHP? Any advice on how to go about these two things?
it makes things a bit difficult, but it can be overcome :)
you could even keep it in the MOVIES table if you do this