CMXX - Update history table to equipment_history
This commit is contained in:
@@ -190,7 +190,7 @@ if (isset($post_content['sn']) && isset($post_content['payload'])){
|
||||
}
|
||||
else {
|
||||
// Insert Equipment
|
||||
$sql = "INSERT INTO history (equipmentid,type,description,createdby ) VALUES (?,?,?,?)";
|
||||
$sql = "INSERT INTO equipment_history (equipmentid,type,description,createdby ) VALUES (?,?,?,?)";
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$rowID,$historytype,$testdetails,$user]);
|
||||
$last_id = $pdo->lastInsertId();
|
||||
@@ -308,7 +308,7 @@ if (isset($post_content['sn']) && isset($post_content['payload'])){
|
||||
|
||||
if($total_servicetool != 0){
|
||||
// Insert historyitem
|
||||
$sql = "INSERT INTO history (equipmentid,type,description,createdby) VALUES (?,?,?,?)";
|
||||
$sql = "INSERT INTO equipment_history (equipmentid,type,description,createdby) VALUES (?,?,?,?)";
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$rowID_servicetool,$historytype,$testdetails,$user]);
|
||||
//Update status to InUse
|
||||
@@ -405,7 +405,7 @@ else {
|
||||
$stmt->execute($execute_input);
|
||||
}
|
||||
elseif ($command == 'insert' && !isset($post_content['delete']) && isAllowed('history',$profile,$permission,'C') === 1){
|
||||
$sql = 'INSERT INTO history ('.$clause_insert.') VALUES ('.$input_insert.')';
|
||||
$sql = 'INSERT INTO equipment_history ('.$clause_insert.') VALUES ('.$input_insert.')';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute($execute_input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user