From 1618f2e665a7500a004f4281a9a011863f342b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CVeLiTi=E2=80=9D?= <“info@veliti.nl”> Date: Tue, 26 Nov 2024 11:42:37 +0100 Subject: [PATCH] CMXX - Update HW_VERSION when provided --- api/v1/get/products_software.php | 4 ++++ api/v2/get/products_software.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/api/v1/get/products_software.php b/api/v1/get/products_software.php index 20aebaf..613ac06 100644 --- a/api/v1/get/products_software.php +++ b/api/v1/get/products_software.php @@ -56,6 +56,10 @@ if(isset($get_content) && $get_content!=''){ //build up search $clause .= ' AND e.serialnumber = :'.$v[0]; } + elseif ($v[0] == 'hw_version') { + //build up search + $clause .= ' AND ps.hw_version = :'.$v[0]; + } elseif ($v[0] == 'status') { //build up search $clause .= ' AND ps.status = :'.$v[0]; diff --git a/api/v2/get/products_software.php b/api/v2/get/products_software.php index e40f9e0..f57ac37 100644 --- a/api/v2/get/products_software.php +++ b/api/v2/get/products_software.php @@ -60,6 +60,10 @@ if(isset($get_content) && $get_content!=''){ //build up search $clause .= ' AND ps.status = :'.$v[0]; } + elseif ($v[0] == 'hw_version') { + //build up search + $clause .= ' AND ps.hw_version = :'.$v[0]; + } else {//create clause $clause .= ' AND '.$v[0].' = :'.$v[0]; }