Added Network
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user