0 && $randId !== '') { $stmt = $pdo->prepare('SELECT * FROM plant_records WHERE id = ? AND rand = ? LIMIT 1'); $stmt->execute([$recordId, $randId]); $row = $stmt->fetch(PDO::FETCH_ASSOC); } if ($row) { // Column is plant_type, not crop $plantType = $row['crop_type'] ?? ''; if ($plantType !== '') { $stmtSpec = $pdo->prepare('SELECT * FROM plant_specifications WHERE plant_type = ? LIMIT 1'); $stmtSpec->execute([$plantType]); $specs = $stmtSpec->fetch(PDO::FETCH_ASSOC) ?: []; } } // ── Spec column name map ────────────────────────────────────────────────────── // The plant_specifications table has inconsistent column casing — map each // element key to its actual min/max column names in the DB. $specCols = [ 'n' => ['n_min', 'n_max'], 'p' => ['P_Min', 'P_Max'], 'k' => ['K_Min', 'K_Max'], 's' => ['S_Min', 'S_Max'], 'mg' => ['Mg_Min', 'Mg_Max'], 'ca' => ['Ca_Min', 'Ca_Max'], 'na' => ['Na_Min', 'Na_Max'], 'fe' => ['Fe_Min', 'Fe_Max'], 'mn' => ['Mn_Min', 'Mn_Max'], 'zn' => ['Zn_Min', 'Zn_Max'], 'cu' => ['Cu_Min', 'Cu_Max'], 'b' => ['B_Min', 'B_Max'], 'm' => ['M_Min', 'M_Max'], 'co' => ['Co_min', 'Co_max'], 'se' => ['se_min', 'se_max'], 'cl' => ['cl_min', 'cl_max'], 'c' => ['c_min', 'c_max'], ]; $h = fn($v) => htmlspecialchars((string)($v ?? ''), ENT_QUOTES, 'UTF-8'); function statusBar(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 = 'Plant Analysis' . (!empty($row['client_name']) ? ' — ' . $row['client_name'] : ''); $siteName = 'Crop Monitor'; if (!$printMode) { include __DIR__ . '/../../../layouts/header.php'; include __DIR__ . '/../../../layouts/navbar.php'; } ?>
Record not found or access denied.
Crop Monitor
DATE: SAMPLE ID:
CLIENT: DATE SAMPLED:
ADDRESS: LAB NUMBER:
CROP TYPE:
Plant Tissue Analysis Results

0 || $max > 0) ? number_format($min, $dp) . '–' . number_format($max, $dp) : '—'; ?> 0 || $max > 0) ? number_format($min, $dp) . '–' . number_format($max, $dp) : '—'; ?> 0 || $max > 0) ? number_format($min, $dp) . '–' . number_format($max, $dp) : '—'; ?>
ELEMENT STATUS
Element Desired Found Deficient Ideal High
MAJOR ELEMENTS (%)
() 0 ? number_format($found, $dp) : '—' ?>
TRACE ELEMENTS (ppm)
() 0 ? number_format($found, $dp) : '—' ?>
OTHER ELEMENTS (ppm)
() 0 ? number_format($found, $dp) : '—' ?>

It is always an advantage to assess tissue analysis results along with a corresponding soil analysis for more accurate diagnosis of plant nutrient status.

Trace element levels — manganese, copper and zinc — can all be affected by fungicide spray residues, giving misleading results.

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

Desired ranges indexed from: CSIRO Plant Analysis Handbook 2nd Ed. Hill Laboratories consultants guide. PIRSA Soil and Plant Analysis.

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