prepare('SELECT * FROM water_records WHERE id = ? AND rand = ? LIMIT 1'); $stmt->execute([$recordId, $randId]); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($row) { $type = $row['analysis_type'] ?? ''; if ($type !== '') { $stmtSpec = $pdo->prepare('SELECT * FROM water_specifications WHERE type = ? LIMIT 1'); $stmtSpec->execute([$type]); $specs = $stmtSpec->fetch(PDO::FETCH_ASSOC) ?: []; } } $h = fn($v) => htmlspecialchars((string)($v ?? ''), ENT_QUOTES, 'UTF-8'); function waterBar(float $found, float $min, float $max): string { if ($max <= 0) return 'N/A'; if ($found < $min) { return '
' . ''; } if ($found > $max) { return '' . '
'; } $pct = ($max > $min) ? round(min(100, ($found - $min) / ($max - $min) * 100)) : 50; return '' . '
' . ''; } $today = date('jS F Y'); $pageTitle = 'Water Analysis' . (!empty($row['client_name']) ? ' — ' . $row['client_name'] : ''); $siteName = 'Crop Monitor'; if (!$printMode) { include __DIR__ . '/../../../layouts/header.php'; } ?>
Record not found or access denied.
Crop Monitor
DATE: SAMPLE ID:
CLIENT: DATE SAMPLED:
SITE ID: LAB NUMBER:
ANALYSIS TYPE:
View Report PDF — Analysis PDF — Analysis & Report
Water Quality Analysis Results
0 || $max > 0) ? number_format($min, $dp) . '–' . number_format($max, $dp) : '—'; $display = $unit ? $label . ' (' . $unit . ')' : $label; ?> 0 || $max > 0) ? number_format($min, $dp) . '–' . number_format($max, $dp) : '—'; ?> 0 || $max > 0) ? number_format($min, $dp) . '–' . number_format($max, $dp) : '—'; ?>
ELEMENT STATUS
Parameter Desired Found Deficit Ideal High
GENERAL PARAMETERS
0 ? number_format($found, $dp) : '—' ?>
MAJOR ELEMENTS (ppm)
() 0 ? number_format($found, $dp) : '—' ?>
TRACE ELEMENTS (ppm)
() 0 ? number_format($found, $dp) : '—' ?>

Water analysis results should be interpreted in the context of intended use (irrigation, drinking, stock water).

Talk to your qualified consultant to make a plan for correction or maintenance of the found parameter levels.

Any recommendations provided by Crop Monitor are advice only. We are not paid consultants and accept no responsibility for any of our suggestions.