Added Network

This commit is contained in:
Frank Schubert
2021-06-24 22:34:45 +02:00
parent 1c6acca834
commit 5241cfd175
12 changed files with 475 additions and 15 deletions

View File

@@ -36,15 +36,19 @@ class AddressattributeModel {
if(!is_numeric($id) || !$id) {
throw new Exception("Invalid number", 400);
}
$item = [];
$db = FronkDB::singleton();
$res = $db->select("Addressattribute", "*", "id=$id LIMIT 1");
if($db->num_rows($res)) {
$data = $db->fetch_object($res);
$item = new Addressattribute($data);
if($item->id) {
return $item;
} else {
return null;
}
}
return $item;
return null;
}
public static function getAll($filter = false) {
@@ -76,10 +80,8 @@ class AddressattributeModel {
} else {
return null;
}
} else {
return null;
}
return $items;
return null;
}
public static function search($filter) {