CMXX - Include updated/by on multiple tables and views
This commit is contained in:
@@ -125,9 +125,9 @@ switch ($action) {
|
||||
$firmware_account_send = 1;
|
||||
//create history
|
||||
// Prepare queries
|
||||
$sql = 'INSERT INTO equipment_history (equipmentid, type, description, created, createdby) VALUES (?,?,?,?,?)';
|
||||
$sql = 'INSERT INTO equipment_history (equipmentid, type, description, created, createdby,updatedby) VALUES (?,?,?,?,?,?)';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$rowID['rowID'],$type9,$description,$timestamp,$post_content['email']]);
|
||||
$stmt->execute([$rowID['rowID'],$type9,$description,$timestamp,$post_content['email'],$post_content['email']]);
|
||||
|
||||
//GET PARTNER DETAILS OF EQUIPMENT
|
||||
$partner_equipment = getrowID($dbname,'accounthierarchy','equipment','rowID="'.$rowID['rowID'].'"');
|
||||
@@ -193,9 +193,9 @@ switch ($action) {
|
||||
// --------------------------------------------
|
||||
// Update equipment record warranty_date, partnerhierarchy, status equipment
|
||||
// --------------------------------------------
|
||||
$sql = 'UPDATE equipment SET status = ?, warranty_date = ?, accounthierarchy = ? WHERE rowID = ?';
|
||||
$sql = 'UPDATE equipment SET status = ?, warranty_date = ?, accounthierarchy = ?,updatedby = ? WHERE rowID = ?';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute(['4',$warranty_extended,$partnerhierarchy,$rowID['rowID']]);
|
||||
$stmt->execute(['4',$warranty_extended,$partnerhierarchy,$username,$rowID['rowID']]);
|
||||
|
||||
//Add warranty to changelog
|
||||
$warranty_user = $post_content['email'] ?? 'system';
|
||||
@@ -232,9 +232,9 @@ switch ($action) {
|
||||
// --------------------------------------------
|
||||
$firmware_account_send = 1;
|
||||
//create history
|
||||
$sql = 'INSERT INTO equipment_history (equipmentid, type, description, created, createdby) VALUES (?,?,?,?,?)';
|
||||
$sql = 'INSERT INTO equipment_history (equipmentid, type, description, created, createdby, updatedby) VALUES (?,?,?,?,?,?)';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$rowID['rowID'],$type9,$description,$timestamp,$post_content['email']]);
|
||||
$stmt->execute([$rowID['rowID'],$type9,$description,$timestamp,$post_content['email'],$post_content['email']]);
|
||||
|
||||
//GET PARTNER DETAILS OF EQUIPMENT
|
||||
$partner_equipment = getrowID($dbname,'accounthierarchy','equipment','rowID="'.$rowID['rowID'].'"');
|
||||
@@ -299,9 +299,9 @@ switch ($action) {
|
||||
// --------------------------------------------
|
||||
// Update equipment record warranty_date, partnerhierarchy, status equipment
|
||||
// --------------------------------------------
|
||||
$sql = 'UPDATE equipment SET status = ?, warranty_date = ?, accounthierarchy = ? WHERE rowID = ?';
|
||||
$sql = 'UPDATE equipment SET status = ?, warranty_date = ?, accounthierarchy = ?, updatedby = ? WHERE rowID = ?';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute(['4',$warranty_extended,$partnerhierarchy,$rowID['rowID']]);
|
||||
$stmt->execute(['4',$warranty_extended,$partnerhierarchy,$username,$rowID['rowID']]);
|
||||
|
||||
//Add warranty to changelog
|
||||
$warranty_user = $post_content['email'] ?? 'system';
|
||||
|
||||
Reference in New Issue
Block a user