CMXX - Product query updates
This commit is contained in:
@@ -68,7 +68,7 @@ if (isset($post_content['product_id']) && $post_content['product_id'] != ''){
|
||||
|
||||
//QUERY AND VERIFY ALLOWED
|
||||
if ($command == 'update' && isAllowed('products_media',$profile,$permission,'U') === 1){
|
||||
$sql = 'UPDATE products_media SET '.$clause.' WHERE rowID = ? '.$whereclause.'';
|
||||
$sql = 'UPDATE products_media SET '.$clause.' WHERE rowID = ? ';
|
||||
$execute_input[] = $id;
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute($execute_input);
|
||||
@@ -79,7 +79,7 @@ if (isset($post_content['product_id']) && $post_content['product_id'] != ''){
|
||||
$stmt->execute($execute_input);
|
||||
}
|
||||
elseif ($command == 'delete' && isAllowed('products_media',$profile,$permission,'D') === 1){
|
||||
$stmt = $pdo->prepare('DELETE FROM products_media WHERE rowID = ? '.$whereclause.'');
|
||||
$stmt = $pdo->prepare('DELETE FROM products_media WHERE rowID = ? ');
|
||||
$stmt->execute([ $id ]);
|
||||
|
||||
//Add deletion to changelog
|
||||
|
||||
Reference in New Issue
Block a user