allFilmData added

Añadida una funcion para seleccionar todas las peliculas de la base de datos
This commit is contained in:
Markines16 2021-04-11 19:57:31 +02:00 committed by GitHub
parent 94c7940cc0
commit dc8c00e751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}
?>