我有一個數據庫:MySQL選擇流派問題。 (PHP)
id | movie_name | genres
1 | Die Hard | Action, Thriller
2 | Gladiator | Adventure, Action, Drama, History
3 | Harry Potter and the Sorcerers Stone | Fantasy, Adventure, Family
4 | Pearl Harbor | Action, Melodrama, War
1)如何我可以從所有的數據庫genres
選擇獨特的風格。 我需要下:動作/冒險/劇情/家庭/奇幻/歷史/音樂劇/驚悚/戰爭
2)我怎麼能看電影某一類型?
SELECT `movie_name` FROM `movies` WHERE `genre` LIKE ??
但他也不僅能帶來戲劇,還能帶來情節劇。
3)如何搜索特定的流派? 可能是:
SELECT `movie_name` FROm `movies` WHERE `movie_name` LIKE `%stone%` AND `genres LIKE 'drama'.
對不起,英語不好。謝謝!
非常感謝! <3 – Isis 2011-03-24 19:01:36