1
I’m trying to make a series site, only I’m suffering to hit the logic of the tables, first I’ll explain how I want it to work, the person enters the site, there are the series that pulls the following information from the bank id(int), id_temp(int, id_temporada), nome_serie, lancamento, audio, thumb_serie
so far so good, then my link that gives access to the chosen series is like this <a href="seriado.php?id=1&id_temp=1">Ver Série</a>
, ai on the page seriado.php
I created two more tables in the bank, which are episodios
and temporadas
, on the table episodios
I have the following fields id(int), id_temp(int), nome_episodio, sinopse, link_video
and in the table temporadas
I have the following fields id(int), id_temp(int), nome_temporada(int)
my select
are like this (series) select * from series
, (episodios) select * from episodios where id = $id or id_temp = $id_temp
, (temporadas) select * from temporadas where id = $id or id_temp = $id_temp
Do you want to take the movies related to a series? For example, if you access a series called "The PHP search" list the episodes of that series?
– brnTwp
Yes, the spisodios and seasons
– goio
Okay, on the chart, these episodes have a relationship with the series, in this case a Foreign key, or something that says this episode belongs to such a series?
– brnTwp
I used the
id_temp
for that, I edited the question, I think it was better what I tried to do, and what I hope– goio