Added voicenumber select in Order

This commit is contained in:
Frank Schubert
2024-03-12 22:34:28 +01:00
parent 1a676fe8aa
commit b4cb70b643
12 changed files with 234 additions and 26 deletions
@@ -37,12 +37,18 @@ class VoicenumberblockModel {
return $model;
}
public static function getAll() {
public static function getAll($order = "countrycode,areacode,first,last") {
$items = [];
$db = FronkDB::singleton();
$res = $db->select("Voicenumberblock", "*");
$order_by = "";
if($order) {
$order_by = $order;
}
$res = $db->select("Voicenumberblock", "*", "1=1 ORDER BY $order_by");
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {
$items[] = new Voicenumberblock($data);