'failed', 'message' => "Mandatory field is missing !({$param})" ]); header('Content-Type: application/json'); echo $response; exit(); } } $UpdateQuery = new WA_MySQLi_Query($cmctrfdb); $UpdateQuery->Action = "update"; $UpdateQuery->Table = "identificationparts"; $UpdateQuery->bindColumn("description_identificationparts", "s", "{$_POST['description_identificationparts']}", "WA_DEFAULT"); $UpdateQuery->bindColumn("article_identificationparts", "s", "{$_POST['article_identificationparts']}", "WA_DEFAULT"); $UpdateQuery->bindColumn("color_identificationparts", "s", "{$_POST['color_identificationparts']}", "WA_DEFAULT"); $UpdateQuery->bindColumn("cmcreportnumber_identificationparts", "s", "{$_POST['cmcreportnumber_identificationparts']}", "WA_DEFAULT"); $UpdateQuery->bindColumn("cmcreportdate_identificationparts", "s", "{$_POST['cmcreportdate_identificationparts']}", "WA_DEFAULT"); $UpdateQuery->bindColumn("thirdlabreportnumber_identificationparts", "s", "{$_POST['thirdlabreportnumber_identificationparts']}", "WA_DEFAULT"); $UpdateQuery->bindColumn("thirdlabreportdate_identificationparts", "s", "{$_POST['thirdlabreportdate_identificationparts']}", "WA_DEFAULT"); $UpdateQuery->bindColumn("idtrfdetails", "i", "{$_POST['idtrfdetails']}", "WA_DEFAULT"); $UpdateQuery->bindColumn("kindoftest", "s", "abc", "WA_DEFAULT"); $UpdateQuery->addFilter("ididentificationparts", "=", "i", "{$_POST['ididentificationparts']}"); try { $UpdateQuery->execute(); $response = json_encode([ 'status' => 'success' ]); } catch (Exception $e) { $response = json_encode([ 'status' => 'failed', 'message' => $e->getMessage() ]); } } else { $response = json_encode([ 'status' => 'failed', 'message' => 'Method not allowed' ]); } header('Content-Type: application/json'); echo $response;