synonim pages and new dump
This commit is contained in:
@@ -216,7 +216,7 @@ while ($row = mysqli_fetch_array($resultworstsupplier)) {
|
||||
$testnameworstsupplier[] = $row['namesupplier'];
|
||||
}
|
||||
|
||||
|
||||
echo "ciaopappa";
|
||||
?>
|
||||
<?php
|
||||
// fecth region area
|
||||
@@ -245,4 +245,41 @@ while ($row = mysqli_fetch_array($resultworstregion)) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
// fecth analytes with most fails
|
||||
$failedAnalytesQuery = "
|
||||
SELECT c.namecompoundsvocabulary AS AnalyteName, COUNT(*) AS FailCount
|
||||
FROM result_project rp
|
||||
LEFT JOIN compundsvocabulary c ON rp.result_AnalytsName = c.idcompoundsvocabulary
|
||||
WHERE LOWER(rp.result_AnalytsRating) IN ('f', 'fail', 'doesn\'t comply')
|
||||
GROUP BY c.namecompoundsvocabulary
|
||||
ORDER BY FailCount DESC
|
||||
LIMIT 10;
|
||||
";
|
||||
|
||||
$resultFailedAnalytes = mysqli_query($repnew, $failedAnalytesQuery) or die("Error in Selecting " . mysqli_error($repnew));
|
||||
|
||||
// Verifica se ci sono risultati
|
||||
if (mysqli_num_rows($resultFailedAnalytes) > 0) {
|
||||
echo "La query ha restituito dei risultati.";
|
||||
} else {
|
||||
echo "La query non ha restituito risultati.";
|
||||
}
|
||||
|
||||
$failedAnalytes = array();
|
||||
while ($row = mysqli_fetch_assoc($resultFailedAnalytes)) {
|
||||
echo "Analita: " . $row['AnalyteName'] . ", Fail Count: " . $row['FailCount'] . "<br>";
|
||||
$failedAnalytes[] = [
|
||||
'AnalyteName' => $row['AnalyteName'],
|
||||
'FailCount' => $row['FailCount']
|
||||
];
|
||||
}
|
||||
|
||||
// Salva i dati per essere utilizzati nel JSON di risposta
|
||||
$data['failedAnalytes'] = $failedAnalytes;
|
||||
echo "<pre>";
|
||||
print_r($data['failedAnalytes']);
|
||||
echo "</pre>";
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user