CMXX - Cronjob
This commit is contained in:
@@ -2544,7 +2544,7 @@ function storeMeasurementEquipment($serialnumber){
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$identification[0],$identification[1]]);
|
||||
$product_measurements = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$product_measurements = $product_measurements[0]['measurement'];
|
||||
$product_measurements = $product_measurements[0]['measurement']?? '';
|
||||
|
||||
if (!empty($product_measurements)){
|
||||
//Only run when there is a product version found
|
||||
@@ -2628,13 +2628,13 @@ function storeMeasurementEquipment($serialnumber){
|
||||
}
|
||||
else {
|
||||
//EXIST INSERT
|
||||
$sql = 'INSERT INTO equipment_data (measurement, , healthindex, equipmentid, historyid) VALUES (?,?,?,?)';
|
||||
$sql = 'INSERT INTO equipment_data (measurement, healthindex, equipmentid, historyid) VALUES (?,?,?,?)';
|
||||
}
|
||||
|
||||
//EXECUTE QUERY
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$data, $healthindex, $identification[2],$identification[3]]);
|
||||
$equipment_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
//$equipment_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user