Add files via upload

This commit is contained in:
Fernando Méndez 2021-04-13 17:37:15 +02:00 committed by GitHub
parent 44fe6593ec
commit 04305d2c79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,8 @@
VALUES ( '%d', '%s', '%d', '%s')",
$id, $tittle, $duration, $language);
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
return $sql;
}
@ -34,6 +36,10 @@
$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"]);
}
return $resul;
}
@ -69,7 +75,7 @@
return $resul;
}
//Edit a film.
public function editFilm($id, $tittle, $duration, $language,$description){
$sql = sprintf( "UPDATE film SET tittle = '%s' , duration = '%d', language ='%s' , description ='%s'
WHERE film.id = '%d';",