CMXX - Changed history to equipment_history

This commit is contained in:
“VeLiTi”
2024-12-02 15:40:05 +01:00
parent 868d73c6b5
commit ad51669e32
17 changed files with 103 additions and 68 deletions

View File

@@ -82,11 +82,11 @@ if(isset($get_content) && $get_content!=''){
if(isset($criterias['totals']) && $criterias['totals'] ==''){
//Request for total rows
$sql ='SELECT count(h.rowID) as historyID from history h LEFT JOIN equipment e ON h.equipmentid = e.rowID '.$whereclause.'';
$sql ='SELECT count(h.rowID) as historyID FROM equipment_history h LEFT JOIN equipment e ON h.equipmentid = e.rowID '.$whereclause.'';
}
else {
//request history
$sql ='SELECT h.rowID as historyID, e.rowID as equipmentID, e.serialnumber, h.type, h.description, h.created, h.createdby from history h LEFT JOIN equipment e ON h.equipmentid = e.rowID '.$whereclause.' ORDER BY h.created DESC LIMIT :page,:num_products';
$sql ='SELECT h.rowID as historyID, e.rowID as equipmentID, e.serialnumber, h.type, h.description, h.created, h.createdby FROM equipment_history h LEFT JOIN equipment e ON h.equipmentid = e.rowID '.$whereclause.' ORDER BY h.created DESC LIMIT :page,:num_products';
}
$stmt = $pdo->prepare($sql);