How to make a list of film and genre - MySQL Join Many-to-Many (should I?) And the PHP? Or do the other way?
Examples:
In MySQL:
Table 1:
movie_id | movie_title
1______ | title_movie_1
2______ | title_movie_2
3______ | title_movie_3
Table 2:
genre_id | genre_title
1______ | title_genre_1
2______ | title_genre_2
3______ | title_genre_3
Table 3:
id | movie_id | genre_1
1_ | __1____ | _1
2_ | __1____ | _2
3_ | __2____ | _1
4_ | __2____ | _3
5_ | __3____ | _1
6_ | __3____ | _3
7_ | __3____ | _2
Results PHP: strong>
Movie: <a href="movie/1 (id_movie)">title_movie_1 _/a>
Genre:
<a href="genre/1 (id_genre)">title_genre_1 _/a>,
<a href="genre/2">title_genre_2 _/a>
Movie: <a href="movie/2 (id_movie)">title_movie_2 _/a>
Genre:
<a href="genre/1">title_genre_1 _/a>,
<a href="genre/3">title_genre_3 _/a>
Movie: <a href="movie/3 (id_movie)">title_movie_3 _/a>
Genre:
<a href="genre/1">title_genre_1 _/a>
<a href="genre/2">title_genre_2 _/a>
<a href="genre/3">title_genre_3 _/a>
I can not find do ... Help, please! I'm waiting!
Saygılarımızla, Areku