Catch result from next line

Asked

Viewed 31 times

0

Hello! I am working on a series guide and I am wanting to create a forward button, in case when it is clicked, it go to next episode...

On the screen there is a forward button that would change episode. I just want that when I click, automatically go to the next episode, I made a select but I don’t know if it’s right.

His url looks like this: profile.html? title=Stranger_things&episode=04

Select:

$titulo = $_GET['titulo'];
$episodio = $_GET['episodio'];

$sql = "select * from episodios join series on episodios.mid = series.id where series.titulo='$titulo' and episodios.episodio > '$episodio' order by episodios.episodio DESC limit 1";

  • If this is the next episode I think the result of your consultation should be ordered in ascending order: episodios.episodio ASC limit 1

  • Did you even test the query? If yes, returned some error?

  • I got it here. I answer the question myself of what I did?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.