From dc8c00e751c6b6af6fe721ea61d7757800dc3f11 Mon Sep 17 00:00:00 2001 From: Markines16 <80280295+Markines16@users.noreply.github.com> Date: Sun, 11 Apr 2021 19:57:31 +0200 Subject: [PATCH] allFilmData added MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AƱadida una funcion para seleccionar todas las peliculas de la base de datos --- panel_admin/includes/film_dao.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/panel_admin/includes/film_dao.php b/panel_admin/includes/film_dao.php index 788822f..1c69c87 100644 --- a/panel_admin/includes/film_dao.php +++ b/panel_admin/includes/film_dao.php @@ -28,12 +28,20 @@ return $resul; } + + //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'); + return $resul; + } + //Create a new film Data Transfer Object. public function loadFilm($id, $tittle, $duration, $language){ return new FilmDTO( $id, $tittle, $duration, $language); } - + } ?>