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