-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.txt
93 lines (58 loc) · 4.62 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
* Add to watchlist for series -> Not done yet
* Start working on the backend -> Not done yet
* Add pagination to my list -> Not done yet
* Remove CSS duplicates -> Not done yet
* Add searching -> Not done yet
* Work more on movie/serie details page -> Done
* Add series to genre view -> Not done yet
* Add loader to movies/series filter -> Done
* Add pagination to movies/series filter -> Done
* Work on the homepage slider -> Done
* Add pagination to movies/series -> Done
* Add filtering to Movies and Series pages -> Done
* Create shows table -> Done
* Create Suggestions under movie details page -> Done
* Create watch page -> Done
* Create actors table and display actors -> Done
* Create keywords table/ and movies_keywords table, series_keywords table -> done
//
// Movies Actors SQL
SELECT tbl_movies_actors.movie_id, tbl_movies.movie_name,tbl_actors.actod_name,tbl_movies_actors.actor_as FROM tbl_movies_actors
JOIN tbl_movies ON tbl_movies_actors.movie_id=tbl_movies.movie_id
JOIN tbl_actors ON tbl_movies_actors.actor_id=tbl_actors.actor_id
WHERE tbl_movies_actors.movie_id=1
SELECT tbl_movies.movie_name,tbl_actors.actod_name,tbl_movies_actors.actor_as FROM tbl_movies_actors
JOIN tbl_movies ON tbl_movies_actors.movie_id=tbl_movies.movie_id
JOIN tbl_actors ON tbl_movies_actors.actor_id=tbl_actors.actor_id
WHERE tbl_movies_actors.movie_id=1;
// When inserting an actor check for duplicates
// Page title to movie title (Helps for SEO)
SELECT tbl_seasons.season_id,tbl_seasons.season_alt_name, tbl_episodes.episode_id,tbl_episodes.episode_name
FROM tbl_seasons
LEFT JOIN tbl_episodes ON tbl_seasons.season_id=tbl_episodes.seasons_id;
// Query to order both movies and series with the genre animation based on release date
SELECT tbl_movies.movie_name, tbl_genres.genre_name, tbl_movies.movie_release_date AS release_date FROM tbl_movies_genres INNER JOIN tbl_movies ON tbl_movies_genres.movie_id=tbl_movies.movie_id INNER JOIN tbl_genres ON tbl_movies_genres.genre_id=tbl_genres.genre_id WHERE tbl_genres.genre_name='Animation' UNION SELECT tbl_series.serie_name, tbl_genres.genre_name, tbl_series.serie_release_date AS release_date FROM tbl_series_genres INNER JOIN tbl_series ON tbl_series_genres.serie_id=tbl_series.serie_id INNER JOIN tbl_genres ON tbl_series_genres.genre_id=tbl_genres.genre_id WHERE tbl_genres.genre_name='Animation' ORDER BY release_date DESC;
SELECT tbl_movies.movie_name AS media_name, tbl_movies.movie_poster_large AS media_poster_large,'movie' AS media_type,tbl_movies.movie_release_date AS release_date
FROM tbl_movies_genres
INNER JOIN tbl_movies ON tbl_movies_genres.movie_id=tbl_movies.movie_id
INNER JOIN tbl_genres ON tbl_movies_genres.genre_id=tbl_genres.genre_id
WHERE tbl_genres.genre_name='Drama'
UNION
SELECT tbl_series.serie_name AS media_name,tbl_series.serie_poster_large AS media_poster_large,'serie' AS media_type,tbl_series.serie_release_date AS release_date
FROM tbl_series_genres
INNER JOIN tbl_series ON tbl_series_genres.serie_id=tbl_series.serie_id
INNER JOIN tbl_genres ON tbl_series_genres.genre_id=tbl_genres.genre_id
WHERE tbl_genres.genre_name='Drama'
ORDER BY release_date DESC;
// Order Movies/Series Based on views
SELECT tbl_movies.movie_id AS media_id, tbl_movies.movie_name AS media_name, tbl_movies.movie_poster_large AS media_poster_large,tbl_movies.movie_views AS media_views FROM tbl_movies WHERE tbl_movies.movie_views>100 UNION SELECT tbl_series.serie_id AS media_id, tbl_series.serie_name AS media_name,tbl_series.serie_poster_large AS media_poster_large,tbl_series.serie_views AS media_views FROM tbl_series WHERE tbl_series.serie_views>100 ORDER BY media_views DESC;
// Movies Age rating:
G -> (General Audiences: all ages admitted)
PG -> (Parental Guidance Suggested: some material may not be suitable for children)
PG-13 -> Parents Strongly Cautioned: some material may be inappropriate for children under 13)
R -> (Restricted: under 17 requires accompanying parent or adult guardian)
NC-17 -> (No One 17 and Under Admitted) most adult rating a movie can have
// Shows Age rating:
TV-Y -> suitable for all children
TV-MA -> not suitable for anyone under 17
TV-Y7, TV-G, TV-PG, TV-14 -> suitable for children ages 7 and above, as well as for general audiences, parental guidance suggested, and for viewers 14 and above, respectively