24 lines
795 B
PHP
24 lines
795 B
PHP
<?php
|
|
try {
|
|
$rowData = j(post("rowData"));
|
|
$key = post("key");
|
|
$status = j(post("values"))["status"];
|
|
$result = db("welder_tests")->where([
|
|
"material_group_1" => $rowData["material_group_1"],
|
|
"material_group_2" => $rowData["material_group_2"],
|
|
"naks_id" => $rowData["naks_id"],
|
|
"wpq_document_no" => $rowData["wpq_document_no"],
|
|
"welding_method" => $rowData["welding_method"],
|
|
"naks_no" => $rowData["naks_no"]
|
|
])->update(["status" => $status]);
|
|
if($result){
|
|
echo json_encode(["success" => true, "result" => $result]);
|
|
}else{
|
|
echo json_encode(["success" => false]);
|
|
}
|
|
} catch (\Throwable $th) {
|
|
//throw $th;
|
|
echo json_encode(["success" => false, "error" => $th->getMessage()]);
|
|
}
|
|
|
|
?>
|