added ContractconfigItem order

This commit is contained in:
Frank Schubert
2022-11-17 23:21:17 +01:00
parent e38c057ef3
commit 623362fb8c
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -186,6 +186,9 @@
<?php endforeach; ?>
</table>
<div class="text-center">
<a href="#" class="btn btn-sm btn-outline-primary">Konfiguration bearbeiten</a>
</div>
</div>
</div>
@@ -41,7 +41,7 @@ class ContractconfigItemModel {
$db = FronkDB::singleton();
$res = $db->select("ContractconfigItem", "*", "1=1 ORDER BY name, `create`");
$res = $db->select("ContractconfigItem", "*", "1=1 ORDER BY `order`, name, `create`");
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {
$items[] = new ContractconfigItem($data);
@@ -55,7 +55,7 @@ class ContractconfigItemModel {
$db = FronkDB::singleton();
$where = self::getSqlFilter($filter);
$res = $db->select("ContractconfigItem", "*", "$where LIMIT 1");
$res = $db->select("ContractconfigItem", "*", "$where ORDER BY `order`,name LIMIT 1");
if($db->num_rows($res)) {
$data = $db->fetch_object($res);
$item = new ContractconfigItem($data);
@@ -73,7 +73,7 @@ class ContractconfigItemModel {
$db = FronkDB::singleton();
$where = self::getSqlFilter($filter);
$res = $db->select("ContractconfigItem", "*", "$where ORDER BY name");
$res = $db->select("ContractconfigItem", "*", "$where ORDER BY `order`,name");
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {
$items[] = new ContractconfigItem($data);