Commit 3ca24723 authored by Nico Schallehn's avatar Nico Schallehn

GROUP BY Having

parent 352e7dce
......@@ -85,7 +85,8 @@ class MediaDBViewerAPI{
$first = false;
}
if( isset($GET_arr['Genre'])){
$Query = 'SELECT group_concat(fg.imdbID) AS imdbIDs FROM FilmGenre AS fg JOIN Genre AS g ON fg.genreID = g.genreID WHERE g.gername IN ("'.str_replace(",", '","', $GET_arr['Genre']).'") ';
$Query = 'SELECT group_concat(fg.imdbID) AS imdbIDs FROM FilmGenre AS fg JOIN Genre AS g ON fg.genreID = g.genreID GROUP BY fg.imdbID HAVING g.gername IN ("'.str_replace(",", '","', $GET_arr['Genre']).'") ';
$this->DebugOut($Query." >>Zeile:".__LINE__);
$Genre = $this->DB_Objekt->query($Query);
if($this->DB_Objekt->error != ""){ return $this->error(1005, $this->DB_Objekt->error);}
$GenreArr = $Genre->fetch_array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment