Skip to content

Commit

Permalink
changed json to be 'result':[{}]
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikBuetler committed Aug 14, 2024
1 parent cf99dcd commit a224741
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libraries/dba/AbstractModelFactory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -812,12 +812,12 @@ public function incrementJobCountAtomically($jobId, $resultCollection)
$index = $helper->fetch(PDO::FETCH_ASSOC);
file_put_contents(UPLOADED_DATA_PATH . 'log/' . $jobId . '.log', "\nIndex is ".$index['@index']."\n", FILE_APPEND);

$checker = $dbh->prepare("UPDATE Job SET logalyzerResults = JSON_SET(
logalyzerResults, '$.result[0].count', 7)
WHERE jobId = :jobId AND JSON_SEARCH(logalyzerResults, 'one', :pattern) is not null;");
$checker->bindParam(':jobId', $jobId, PDO::PARAM_INT);
$checker->bindParam(':pattern', $pattern['pattern'], PDO::PARAM_STR);
$checker->execute();
#$checker = $dbh->prepare("UPDATE Job SET logalyzerResults = JSON_SET(
# logalyzerResults, '$.result[0].count', 7)
# WHERE jobId = :jobId AND JSON_SEARCH(logalyzerResults, 'one', :pattern) is not null;");
#$checker->bindParam(':jobId', $jobId, PDO::PARAM_INT);
#$checker->bindParam(':pattern', $pattern['pattern'], PDO::PARAM_STR);
#$checker->execute();

$stmt2 = $dbh->prepare("UPDATE Job
SET logalyzerResults = JSON_SET(
Expand Down

0 comments on commit a224741

Please sign in to comment.