Added more filtering to Preorder/Index
This commit is contained in:
@@ -65,7 +65,7 @@ class NetworkModel {
|
||||
|
||||
}
|
||||
|
||||
public static function getFirst() {
|
||||
public static function getFirst($filter = false) {
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
$where = self::getSqlFilter($filter);
|
||||
@@ -124,6 +124,15 @@ class NetworkModel {
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("adb_network_id", $filter)) {
|
||||
$adb_network_id = $filter['adb_network_id'];
|
||||
if(is_numeric($adb_network_id)) {
|
||||
$where .= " AND adb_network_id=$adb_network_id";
|
||||
} elseif(is_array($adb_network_id) && count($adb_network_id)) {
|
||||
$where .= " AND adb_network_id IN (". implode(",", $adb_network_id).")";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//var_dump($filter, $where);exit;
|
||||
|
||||
Reference in New Issue
Block a user