update function tittleFilmData()
added DISTINCT clause to avoid duplicates in the query
This commit is contained in:
parent
5a5a99ad80
commit
9e9661e4f9
@ -65,14 +65,13 @@
|
|||||||
$tittle,$duration,$language, $description,$id);
|
$tittle,$duration,$language, $description,$id);
|
||||||
|
|
||||||
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
||||||
|
|
||||||
return $resul;
|
return $resul;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Returns a query to get all films tittles.
|
//Returns a query to get all films tittles.
|
||||||
public function tittleFilmData(){
|
public function tittleFilmData(){
|
||||||
$sql = sprintf( "SELECT tittle FROM film ");
|
$sql = sprintf( "SELECT DISTINCT tittle FROM film ");
|
||||||
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
||||||
|
|
||||||
return $resul;
|
return $resul;
|
||||||
|
Loading…
Reference in New Issue
Block a user