Added sla_id in Contract/Form
This commit is contained in:
@@ -48,12 +48,17 @@ class SlaModel {
|
||||
return $item;
|
||||
}
|
||||
|
||||
public static function getAll() {
|
||||
public static function getAll($order = false) {
|
||||
$items = [];
|
||||
|
||||
|
||||
$_order = "name";
|
||||
if($order) {
|
||||
$_order = $order;
|
||||
}
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
$res = $db->select("Sla", "*", "1 = 1 ORDER BY name");
|
||||
$res = $db->select("Sla", "*", "1 = 1 ORDER BY $_order");
|
||||
if($db->num_rows($res)) {
|
||||
while($data = $db->fetch_object($res)) {
|
||||
$items[] = new Sla($data);
|
||||
|
||||
Reference in New Issue
Block a user