CMXX - Product query updates

This commit is contained in:
“VeLiTi”
2025-02-25 11:10:00 +01:00
parent bc7e83efe9
commit 3a52632d61
19 changed files with 994 additions and 58 deletions

View File

@@ -68,7 +68,7 @@ if (isset($post_content['productrowid']) && $post_content['productrowid'] != '')
//QUERY AND VERIFY ALLOWED
if ($command == 'update' && isAllowed('products_versions',$profile,$permission,'U') === 1){
$sql = 'UPDATE products_versions SET '.$clause.' WHERE rowID = ? '.$whereclause.'';
$sql = 'UPDATE products_versions SET '.$clause.' WHERE rowID = ? ';
$execute_input[] = $id;
$stmt = $pdo->prepare($sql);
$stmt->execute($execute_input);
@@ -79,7 +79,7 @@ if (isset($post_content['productrowid']) && $post_content['productrowid'] != '')
$stmt->execute($execute_input);
}
elseif ($command == 'delete' && isAllowed('products_versions',$profile,$permission,'D') === 1){
$stmt = $pdo->prepare('DELETE FROM products_versions WHERE rowID = ? '.$whereclause.'');
$stmt = $pdo->prepare('DELETE FROM products_versions WHERE rowID = ? ');
$stmt->execute([ $id ]);
//Add deletion to changelog