From 9f93a4de1749a5a98ab8dcc2d3ecbb279d8c9caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Tue, 13 Apr 2021 19:22:20 +0200 Subject: [PATCH] Update film_dao.php --- panel_admin/includes/film_dao.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/panel_admin/includes/film_dao.php b/panel_admin/includes/film_dao.php index d284f29..4720f0a 100644 --- a/panel_admin/includes/film_dao.php +++ b/panel_admin/includes/film_dao.php @@ -31,16 +31,16 @@ return $resul; } - //Returns a query to get All the films. + //Returns a query to get All the films. public function allFilmData(){ $sql = sprintf( "SELECT * FROM film "); $resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database'); - + while($fila=mysqli_fetch_array($resul)){ - $films[] = $this->loadFilm($fila["id"], $fila["tittle"], $fila["duration"], $fila["language"], $fila["description"]); + $films[] = $this->loadFilm($fila["id"], $fila["tittle"],$fila["duration"],$fila["language"],$fila["description"]); } - - return $resul; + + return $films; } //Returns a query to get all films tittles.