CIM77 - Update

This commit is contained in:
“VeLiTi”
2024-05-17 10:51:45 +02:00
parent 448c08fec3
commit 2036869663
6 changed files with 33 additions and 22 deletions

View File

@@ -133,12 +133,13 @@ elseif (isset($criterias['history']) && $criterias['history'] != ''){
break;
default:
$sort = '';
$current_page = isset($criterias['p']) && is_numeric($criterias['p']) ? (int)$criterias['p'] : 1;
$start_page = ($current_page - 1) * $page_rows_history;
$sort = ' ORDER BY h.created DESC LIMIT '.$start_page.','.$page_rows_history;
break;
}
//request history
$sql ='SELECT h.rowID as historyID, e.rowID as equipmentID, h.equipmentid as h_equipmentid, e.serialnumber, h.type, h.description, h.created, h.createdby from history h LEFT JOIN equipment e ON h.equipmentid = e.rowID '.$whereclause.$sort;
$sql ='SELECT h.rowID as historyID, e.rowID as equipmentID, h.equipmentid as h_equipmentid, e.serialnumber, h.type, h.description, h.created, h.createdby from history h LEFT JOIN equipment e ON h.equipmentid = e.rowID '.$whereclause.$sort;
}
else {
// GET SORT INDICATOR