Commit 56bb68b1 authored by Nico Schallehn's avatar Nico Schallehn

Alles auf Kürzere Foreach variante umgestellt

parent 3a7a982b
...@@ -63,14 +63,17 @@ class MediaDBViewerAPI{ ...@@ -63,14 +63,17 @@ class MediaDBViewerAPI{
$imdbArrToCompar = 0; $imdbArrToCompar = 0;
$Where = "WHERE "; $Where = "WHERE ";
// = Filter: // = Filter:
if(isset($GET_arr['imdbID']) AND is_numeric($GET_arr['imdbID'])){ foreach ($array_expression as $key => $value) {
$Where .= ($first?"":" AND ").'imdbID = "'.$GET_arr['imdbID'].'"'; if(isset($GET_arr[$key]) AND is_numeric($GET_arr[$key])){
$Where .= ($first?"":" AND ").$value.' = "'.$GET_arr[$key].'"';
$first = false; $first = false;
} }
}
/*
if(isset($GET_arr['3d']) ){ if(isset($GET_arr['3d']) ){
$Where .= ($first?"":" AND ").'3d '.($GET_arr['3d']?"!=":"=").'""'; $Where .= ($first?"":" AND ").'3d '.($GET_arr['3d']?"!=":"=").'""';
$first = false; $first = false;
} }*/
if(isset($GET_arr['Englisch']) ){ if(isset($GET_arr['Englisch']) ){
$Where .= ($first?"":" AND ").'acodeceng'.($GET_arr['Englisch']?" IS NOT ":" IS ").'null'; $Where .= ($first?"":" AND ").'acodeceng'.($GET_arr['Englisch']?" IS NOT ":" IS ").'null';
$first = false; $first = false;
...@@ -79,7 +82,7 @@ class MediaDBViewerAPI{ ...@@ -79,7 +82,7 @@ class MediaDBViewerAPI{
$Where .= ($first?"":" AND ").'acodecger'.($GET_arr['Deutsch']?" IS NOT ":" IS ").'null'; $Where .= ($first?"":" AND ").'acodecger'.($GET_arr['Deutsch']?" IS NOT ":" IS ").'null';
$first = false; $first = false;
} }
/* diesen CODE-Block kürzer schreiben!! */ /* diesen CODE-Block kürzer schreiben!!
if(isset($GET_arr['acodecger']) ){ if(isset($GET_arr['acodecger']) ){
$Where .= ($first?"":" AND ").'acodecger = "'.$GET_arr['acodecger'].'"'; $Where .= ($first?"":" AND ").'acodecger = "'.$GET_arr['acodecger'].'"';
$first = false; $first = false;
...@@ -107,7 +110,7 @@ class MediaDBViewerAPI{ ...@@ -107,7 +110,7 @@ class MediaDBViewerAPI{
if(isset($GET_arr['hdd']) ){ if(isset($GET_arr['hdd']) ){
$Where .= ($first?"":" AND ").'hdd = "'.$GET_arr['hdd'].'"'; $Where .= ($first?"":" AND ").'hdd = "'.$GET_arr['hdd'].'"';
$first = false; $first = false;
} } */
if(isset($GET_arr['checked']) ){ if(isset($GET_arr['checked']) ){
if($GET_arr['checked'] == "NULL"){ if($GET_arr['checked'] == "NULL"){
$Where .= ($first?"":" AND ").'checked IS NULL'; $Where .= ($first?"":" AND ").'checked IS NULL';
......
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